code update
This commit is contained in:
@@ -182,9 +182,6 @@ if __name__ == "__main__":
|
||||
raise ValueError(
|
||||
"No results directory specified. Please set the RESULTS_ROOT_DIR environment variable or provide a results_dir argument.")
|
||||
|
||||
if not os.path.exists(results_dir):
|
||||
os.makedirs(results_dir)
|
||||
|
||||
if not args.lmdb_root_dir:
|
||||
if "base_lmdb_root_dir" not in run_configuration:
|
||||
lmdb_root_dir = os.getenv("LMDB_ROOT_DIR")
|
||||
@@ -197,9 +194,6 @@ if __name__ == "__main__":
|
||||
raise ValueError(
|
||||
"No LMDB root directory specified. Please set the LMDB_ROOT_DIR environment variable or provide a lmdb_root_dir argument.")
|
||||
|
||||
if not os.path.exists(lmdb_root_dir):
|
||||
os.makedirs(lmdb_root_dir)
|
||||
|
||||
if not args.log_dir:
|
||||
if "base_log_dir" not in run_configuration:
|
||||
log_dir = os.getenv("LOG_DIR")
|
||||
@@ -210,8 +204,6 @@ if __name__ == "__main__":
|
||||
if log_dir is None:
|
||||
raise ValueError(
|
||||
"No log directory specified. Please set the LOG_DIR environment variable or provide a log_dir argument.")
|
||||
if not os.path.exists(log_dir):
|
||||
os.makedirs(log_dir)
|
||||
|
||||
try:
|
||||
item_limit = args.item_limit if args.item_limit else run_configuration["item_limit"]
|
||||
@@ -226,6 +218,10 @@ if __name__ == "__main__":
|
||||
# set up run_id on rank 0
|
||||
if local_rank == 0:
|
||||
run_id = f"{run_name}_{datetime.now().strftime('%Y%m%d_%H%M%S')}"
|
||||
if not os.path.exists(log_dir):
|
||||
os.makedirs(log_dir)
|
||||
if not os.path.exists(results_dir):
|
||||
os.makedirs(results_dir)
|
||||
else:
|
||||
run_id = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user