更新 'pretrain.py'

This commit is contained in:
liuzx 2022-12-06 10:21:44 +08:00
parent 9d2408fd9a
commit dcfa95dd42
1 changed files with 7 additions and 4 deletions

View File

@ -164,10 +164,13 @@ if __name__ == "__main__":
data_dir = '/cache/data'
train_dir = '/cache/output'
ckpt_url = '/cache/checkpoint.ckpt'
if not os.path.exists(data_dir):
os.makedirs(data_dir)
if not os.path.exists(train_dir):
os.makedirs(train_dir)
try:
if not os.path.exists(data_dir):
os.makedirs(data_dir)
if not os.path.exists(train_dir):
os.makedirs(train_dir)
except Exception as e:
print("path already exists")
###Initialize and copy data to training image
###Copy ckpt file from obs to training image
ObsUrlToEnv(args.ckpt_url, ckpt_url)