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 3838from ..utils import CONFIG_NAME
3939from ..utils .downloader import (
4040 COMMUNITY_MODEL_PREFIX ,
41- get_path_from_url ,
41+ get_path_from_url_with_filelock ,
4242 is_url ,
4343 url_file_exists ,
4444)
@@ -148,7 +148,7 @@ def cached_path(
148148 shutil .rmtree (file_path , ignore_errors = True )
149149
150150 # 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 (
152152 url_or_filename ,
153153 root_dir = cache_dir ,
154154 )
@@ -784,7 +784,7 @@ def _get_config_dict(
784784
785785 # 3. get the configuration file from url, eg: https://ip/path/to/model_config.jsons
786786 elif is_url (pretrained_model_name_or_path ):
787- resolved_config_file = get_path_from_url (
787+ resolved_config_file = get_path_from_url_with_filelock (
788788 pretrained_model_name_or_path , cache_dir , check_exist = not force_download
789789 )
790790 # 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