Skip to content

Commit 8dba541

Browse files
authored
fixed: searchin for key instead of attribute in private config (ecmwf#135)
1 parent b74a0f2 commit 8dba541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/weathergen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def evaluate():
9393
init_loggers()
9494

9595
# load config: if run_id is full path, it loads from there
96-
model_path = private_cf["model_path"] if hasattr(private_cf, "model_path") else "./models"
96+
model_path = private_cf["model_path"] if "model_path" in private_cf.keys() else "./models"
9797
cf = Config.load(args.run_id, args.epoch, model_path)
9898

9999
# add parameters from private (paths) config

0 commit comments

Comments
 (0)