Skip to content

Commit

Permalink
Add missing inversion of best_f in minimization mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSosic committed Jan 21, 2025
1 parent 79a94eb commit fdeb2da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
between constraints and dropped parameters yielding empty parameter sets
- Minimizing a single `NumericalTarget` with specified bounds/transformation via
`SingleTargetObjective` no longer erroneously maximizes it
- Improvement-based Monte Carlo acquisition functions now use the correct
reference value in minimization mode

### Removed
- `botorch_function_wrapper` utility for creating lookup callables
Expand Down
1 change: 1 addition & 0 deletions baybe/acquisition/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def to_botorch(
if issubclass(acqf_cls, bo_acqf.AnalyticAcquisitionFunction):
additional_params["maximize"] = False
elif issubclass(acqf_cls, bo_acqf.MCAcquisitionFunction):
additional_params["best_f"] *= -1.0
additional_params["objective"] = LinearMCObjective(
torch.tensor([-1.0])
)
Expand Down

0 comments on commit fdeb2da

Please sign in to comment.