Skip to content
Snippets Groups Projects
Commit fca651aa authored by leufen1's avatar leufen1
Browse files

revert some changes to make it compatible with older versions

parent d4d9790f
Branches lukas_issue448_feat_load-model-from-path
Tags
3 merge requests!522filter can now combine obs, forecast, and apriori for first iteration. Further...,!521Resolve "release v2.4.0",!512Lukas issue448 feat load model from path
Pipeline #139869 failed
......@@ -68,8 +68,8 @@ class ModelSetup(RunEnvironment):
self.model_load_path = None
path = self._set_model_path()
self.model_path = path % "%s.h5"
self.checkpoint_name = path % "_model-best.h5"
self.callbacks_name = path % "_model-best-callbacks-%s.pickle"
self.checkpoint_name = path % "model-best.h5"
self.callbacks_name = path % "model-best-callbacks-%s.pickle"
self._run()
def _run(self):
......@@ -111,7 +111,7 @@ class ModelSetup(RunEnvironment):
f"create_new_model={self._create_new_model} is not possible. Either set both "
f"parameters to False or remove `model_path` parameter. Given was: model_path = "
f"{self.model_load_path}")
return os.path.join(self.path, f"{self.model_display_name or exp_name}%s")
return os.path.join(self.path, f"{exp_name}_%s")
def _set_shapes(self):
"""Set input and output shapes from train collection."""
......@@ -220,8 +220,7 @@ class ModelSetup(RunEnvironment):
model_settings = self.model.get_settings()
self.data_store.set_from_dict(model_settings, self.scope, log=True)
generic_model_name = self.data_store.get_default("model_name", self.scope, "my_model")
model_annotation = generic_model_name if self.model_display_name is None else ""
self.model_path = self.model_path % model_annotation
self.model_path = self.model_path % generic_model_name
self.data_store.set("model_name", self.model_path, self.scope)
def plot_model(self): # pragma: no cover
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment