mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
In a parallel setup this could fail
This commit is contained in:
parent
894812c652
commit
afc24ea5d4
@ -316,8 +316,7 @@ def get_from_cache(
|
||||
if isinstance(cache_dir, Path):
|
||||
cache_dir = str(cache_dir)
|
||||
|
||||
if not os.path.exists(cache_dir):
|
||||
os.makedirs(cache_dir)
|
||||
os.makedirs(cache_dir, exist_ok=True)
|
||||
|
||||
# Get eTag to add to filename, if it exists.
|
||||
if url.startswith("s3://"):
|
||||
|
Loading…
Reference in New Issue
Block a user