File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,17 @@ def main():
145
145
if os .path .isdir (options ['logs' ]['dir_logs' ]):
146
146
if click .confirm ('Logs directory already exists in {}. Erase?'
147
147
.format (options ['logs' ]['dir_logs' ], default = False )):
148
- os .system ('rm -r ' + options ['logs' ]['dir_logs' ])
148
+ os .system ('rm -r ' + options ['logs' ]['dir_logs' ])
149
149
else :
150
150
return
151
- os .system ('mkdir -p ' + options ['logs' ]['dir_logs' ])
152
- os .system ('cp {} {}' .format (args .path_opt , options ['logs' ]['dir_logs' ]))
151
+ os .system ('mkdir -p ' + options ['logs' ]['dir_logs' ])
152
+ path_new_opt = os .path .join (options ['logs' ]['dir_logs' ],
153
+ os .path .basename (args .path_opt ))
154
+ path_args = os .path .join (options ['logs' ]['dir_logs' ], 'args.yaml' )
155
+ with open (path_new_opt , 'w' ) as f :
156
+ yaml .dump (options , f , default_flow_style = False )
157
+ with open (path_args , 'w' ) as f :
158
+ yaml .dump (vars (args ), f , default_flow_style = False )
153
159
154
160
if exp_logger is None :
155
161
# Set loggers
You can’t perform that action at this time.
0 commit comments