Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore old MLL fit #320

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
are not passed on to the GPyTorch kernels
- Positive-valued kernel attributes are now correctly handled by validators
and hypothesis strategies
- Reverted `fit_gpytorch_mll` call back to old `fit_gpytorch_mll_torch` call until
finetuning is achieved

### Deprecations
- `SequentialGreedyRecommender` class replaced with `BotorchRecommender`
Expand Down
3 changes: 2 additions & 1 deletion baybe/surrogates/gaussian_process/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def _fit(self, searchspace: SearchSpace, train_x: Tensor, train_y: Tensor) -> No
import botorch
import gpytorch
import torch
from botorch.optim.fit import fit_gpytorch_mll_torch

# identify the indexes of the task and numeric dimensions
# TODO: generalize to multiple task parameters
Expand Down Expand Up @@ -138,4 +139,4 @@ def _fit(self, searchspace: SearchSpace, train_x: Tensor, train_y: Tensor) -> No
likelihood=likelihood,
)
mll = gpytorch.ExactMarginalLogLikelihood(self._model.likelihood, self._model)
botorch.fit_gpytorch_mll(mll)
fit_gpytorch_mll_torch(mll, step_limit=100)
Loading