diff --git a/mlair/run_modules/model_setup.py b/mlair/run_modules/model_setup.py index 3164db789e79a92364b300b5d8724861031afeb8..3933d8d6de6288ff6edb235c135b4994c95c0098 100644 --- a/mlair/run_modules/model_setup.py +++ b/mlair/run_modules/model_setup.py @@ -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