File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -482,10 +482,15 @@ def save_ops(ops, results_dir=None):
482482 # Convert paths to strings before saving, otherwise ops can only be loaded
483483 # on the system that originally ran the code (causes problems for tests).
484484 ops ['settings' ]['results_dir' ] = str (results_dir )
485- # TODO: why do these get saved twice?
486- ops ['filename' ] = str (ops ['filename' ])
485+ if isinstance (ops ['filename' ], list ):
486+ ops ['filename' ] = [str (f ) for f in ops ['filename' ]]
487+ else :
488+ ops ['filename' ] = str (ops ['filename' ])
487489 ops ['data_dir' ] = str (ops ['data_dir' ])
488- ops ['settings' ]['filename' ] = str (ops ['settings' ]['filename' ])
490+ if isinstance (ops ['settings' ]['filename' ], list ):
491+ ops ['settings' ]['filename' ] = [str (f ) for f in ops ['settings' ]['filename' ]]
492+ else :
493+ ops ['settings' ]['filename' ] = str (ops ['settings' ]['filename' ])
489494 ops ['settings' ]['data_dir' ] = str (ops ['settings' ]['data_dir' ])
490495
491496 # Convert pytorch tensors to numpy arrays before saving, otherwise loading
You can’t perform that action at this time.
0 commit comments