Skip to content

Commit 6267cd1

Browse files
authored
Fix path handling to make it backward compatible. (ecmwf#133)
1 parent 8022b35 commit 6267cd1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/weathergen/train/trainer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def init(
7878
cf = self.init_streams(cf, run_id_contd)
7979

8080
# create output directory
81+
cf.run_path = cf.run_path if hasattr(cf, "run_path") else "./results"
82+
cf.model_path = cf.model_path if hasattr(cf, "model_path") else "./models"
8183
path_run = Path(cf.run_path) / cf.run_id
8284
path_model = Path(cf.model_path) / cf.run_id
8385
if self.cf.rank == 0:

0 commit comments

Comments
 (0)