mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 22:25:01 +00:00
pretrain-predict: create dir if not exists
This commit is contained in:
parent
deede32241
commit
131c0a0a5b
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,10 @@ def run(args):
|
|||
if not os.path.exists(args.checkpoint):
|
||||
raise Exception(f"Error: The specified filepath to the checkpoint to load ('{args.checkpoint}) does not exist.")
|
||||
|
||||
if args.records_per_file > 0:
|
||||
dirpath_output=os.path.dirname(args.output)
|
||||
if not os.path.exists(dirpath_output):
|
||||
os.mkdir(dirpath_output)
|
||||
|
||||
filepath_output = args.output if hasattr(args, "output") and args.output != None else "-"
|
||||
|
||||
|
|
Loading…
Reference in a new issue