Add Mirror Option for Downloads (#6679)
* Add Tuna Mirror for Downloads from China * format fix * Use preset instead of hardcoding URL * Fix * make style * update the mirror option doc * update the mirror
This commit is contained in:
@@ -337,7 +337,9 @@ class PretrainedConfig(object):
|
||||
elif os.path.isfile(pretrained_model_name_or_path) or is_remote_url(pretrained_model_name_or_path):
|
||||
config_file = pretrained_model_name_or_path
|
||||
else:
|
||||
config_file = hf_bucket_url(pretrained_model_name_or_path, filename=CONFIG_NAME, use_cdn=False)
|
||||
config_file = hf_bucket_url(
|
||||
pretrained_model_name_or_path, filename=CONFIG_NAME, use_cdn=False, mirror=None
|
||||
)
|
||||
|
||||
try:
|
||||
# Load from URL or cache if already cached
|
||||
|
||||
Reference in New Issue
Block a user