note: Time of check to time of use
This commit is contained in:
parent
cbfed5b01a
commit
f7dda38b10
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ for model in models:
|
|||
model_config_path = f"{model_name_or_path}/config.json"
|
||||
|
||||
# check dir path
|
||||
if not os.path.exists(model_name_or_path):
|
||||
if not os.path.exists(model_name_or_path): # TOCTOU
|
||||
os.makedirs(model_name_or_path)
|
||||
else:
|
||||
logger.info(f"Directory {model_name_or_path} already exists - skipping")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue