Hotfix: same handling of non-existent files as for config

This commit is contained in:
Julien Chaumond 2020-01-30 20:05:04 -05:00
parent b85c59f997
commit 7fe294bf07

View File

@ -152,6 +152,8 @@ class ModelCard(object):
resolved_model_card_file = cached_path(
model_card_file, cache_dir=cache_dir, force_download=True, proxies=proxies, resume_download=False
)
if resolved_model_card_file is None:
raise EnvironmentError
if resolved_model_card_file == model_card_file:
logger.info("loading model card file {}".format(model_card_file))
else: