Unverified Commit ecfd3363 authored by Julien Chaumond's avatar Julien Chaumond Committed by GitHub
Browse files

Simpler Error message when loading config/model with .from_pretrained() (#3341)

parent 8eeefcb5
......@@ -251,14 +251,10 @@ class PretrainedConfig(object):
else:
msg = (
"Can't load '{}'. Make sure that:\n\n"
"- '{}' is either a correct model identifier of a community model from 'https://huggingface.co/models' which has a '{}' file\n\n"
"- or '{}' is a model name in {}\n\n"
"- or '{}' is the correct path to a directory containing a '{}' file".format(
"- '{}' is a correct model identifier listed on 'https://huggingface.co/models'\n\n"
"- or '{}' is the correct path to a directory containing a '{}' file\n\n".format(
pretrained_model_name_or_path,
pretrained_model_name_or_path,
CONFIG_NAME,
pretrained_model_name_or_path,
list(pretrained_config_archive_map.keys()),
pretrained_model_name_or_path,
CONFIG_NAME,
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment