Skip to content

Commit

Permalink
Fix missing fixed parameters in scatter search results (#1265)
Browse files Browse the repository at this point in the history
So far, the OptimizerResults from Ess/Cess/SacessOptimizer (incorrectly) contained only the estimated parameter values.
Now, fixed parameters are included as well, as done for the other Optimizers.
  • Loading branch information
dweindl committed Jan 4, 2024
1 parent c350f65 commit 781b9db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pypesto/optimize/ess/cess.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def _create_result(
message="Global best",
**common_result_fields,
)
optimizer_result.update_to_full(problem)
# TODO DW: Create a single History with the global best?
result.optimize_result.append(optimizer_result)

Expand All @@ -241,6 +242,7 @@ def _create_result(
**common_result_fields,
)
)
result.optimize_result[-1].update_to_full(result.problem)

# TODO DW: also save local solutions?
# (need to track fvals or re-evaluate)
Expand Down
2 changes: 2 additions & 0 deletions pypesto/optimize/ess/ess.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def _create_result(self) -> pypesto.Result:
message="Global best",
**common_result_fields,
)
optimizer_result.update_to_full(result.problem)
# TODO DW: Create a single History with the global best?
result.optimize_result.append(optimizer_result)

Expand All @@ -327,6 +328,7 @@ def _create_result(self) -> pypesto.Result:
**common_result_fields,
)
)
result.optimize_result[-1].update_to_full(result.problem)

# TODO DW: also save local solutions?
# (need to track fvals or re-evaluate)
Expand Down

0 comments on commit 781b9db

Please sign in to comment.