diff --git a/pypesto/select/misc.py b/pypesto/select/misc.py index 33d35d0d4..ee9e9a5dd 100644 --- a/pypesto/select/misc.py +++ b/pypesto/select/misc.py @@ -205,7 +205,7 @@ def __init__( if self.save_history and self.tmpdir is None: self.tmpdir = Path.cwd() / "sacess_tmpdir" - def __call__(self, problem: Problem, model_hash: str, **minimize_options): + def __call__(self, problem: Problem, model_id: str, **minimize_options): """Create then run a problem-specific sacess optimizer.""" # create optimizer ess_init_args = get_default_ess_options( @@ -215,7 +215,7 @@ def __call__(self, problem: Problem, model_hash: str, **minimize_options): for x in ess_init_args: x["local_optimizer"] = self.local_optimizer if self.tmpdir is not None: - model_tmpdir = self.tmpdir / model_hash + model_tmpdir = self.tmpdir / model_id model_tmpdir.mkdir(exist_ok=False, parents=True) ess = SacessOptimizer( diff --git a/pypesto/select/model_problem.py b/pypesto/select/model_problem.py index 5e5c44bba..b47f932b1 100644 --- a/pypesto/select/model_problem.py +++ b/pypesto/select/model_problem.py @@ -149,7 +149,7 @@ def minimize(self) -> Result: if isinstance(self.minimize_method, SacessMinimizeMethod): return self.minimize_method( self.pypesto_problem, - model_hash=self.model.get_hash(), + model_id=self.model.model_id, **self.minimize_options, ) return self.minimize_method(