File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 38
38
from ..utils import CONFIG_NAME
39
39
from ..utils .downloader import (
40
40
COMMUNITY_MODEL_PREFIX ,
41
- get_path_from_url ,
41
+ get_path_from_url_with_filelock ,
42
42
is_url ,
43
43
url_file_exists ,
44
44
)
@@ -148,7 +148,7 @@ def cached_path(
148
148
shutil .rmtree (file_path , ignore_errors = True )
149
149
150
150
# URL, so get it from the cache (downloading if necessary)
151
- output_path = get_path_from_url (
151
+ output_path = get_path_from_url_with_filelock (
152
152
url_or_filename ,
153
153
root_dir = cache_dir ,
154
154
)
@@ -788,7 +788,7 @@ def _get_config_dict(
788
788
789
789
# 3. get the configuration file from url, eg: https://ip/path/to/model_config.jsons
790
790
elif is_url (pretrained_model_name_or_path ):
791
- resolved_config_file = get_path_from_url (
791
+ resolved_config_file = get_path_from_url_with_filelock (
792
792
pretrained_model_name_or_path , cache_dir , check_exist = not force_download
793
793
)
794
794
# 4. get the configuration file from local dir with default name, eg: /local/path
You can’t perform that action at this time.
0 commit comments