Skip to content

Commit

Permalink
use model ID instead of hash, since ID defaults to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilan Pathirana committed Mar 27, 2024
1 parent 927a28b commit 30a9118
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pypesto/select/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pypesto/select/model_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 30a9118

Please sign in to comment.