question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fully Bayesian Modular Botorch Model (SAASBO in MBM)

See original GitHub issue

Dear developers,

I am deeply appreciating the great work you’ve done on BOTorch and Ax.

As far as I understand, Fully Bayesian BO is for now restricted to the qNEI acquisition and the SingleTaskGP surrogate. What would be the best approach to access the entire BOTorch modelling kit using Fully Bayesian estimation? Are you plannning anything in this direction?

I thought it would be great to have a Fully Bayesian option within botorch_modular, something along the lines of:

class ax.modelbridge.registry.Models(value)
...
FULLYBAYESIAN_MODULAR = 'FullyBayesianBotorchModel'

With FullyBayesianBotorchModel defined as:

from ax.models.torch.botorch_modular.model import BotorchModel
....
class FullyBayesianBotorchModel(FullyBayesianBotorchModelMixin, BotorchModel):

which would then allow fully flexible use of the BOTorch components. Of course I’d be happy to help out on this, Thank again for the great work!

Paolo

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lena-kashtelyancommented, Apr 15, 2022

This functionality is now on latest! To set up the generation strategy:

from botorch.models import SaasFullyBayesianSingleTaskGP
from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
from ax.modelbridge.registry import Models

GenerationStrategy(
    steps=[
        # Quasi-random initialization step
        GenerationStep(
            model=Models.SOBOL,
            num_trials=5,  # How many trials should be produced from this generation step
        ),
        # Bayesian optimization step using the custom acquisition function
        GenerationStep(
            model=Models.BOTORCH_MODULAR,
            num_trials=-1,  # No limitation on how many trials should be produced from this step
            # For `BOTORCH_MODULAR`, we pass in kwargs to specify what surrogate or acquisition function to use.
            model_kwargs={
                "surrogate": Surrogate(SaasFullyBayesianSingleTaskGP),
            },
        ),
    ]
)

This will also be included in the next stable release of Ax.

0reactions
lena-kashtelyancommented, Apr 27, 2022

This is now on latest stable: 0.2.5.1 : )

Read more comments on GitHub >

github_iconTop Results From Across the Web

High-dimensional Bayesian optimization with SAASBO
We generate a simple function that only depends on the first parameter and show that the SAAS model sets all other lengthscales to...
Read more >
Source code for botorch.models.fully_bayesian
The SAAS model uses sparsity-inducing priors to identify the most important parameters. This model is suitable for high-dimensional BO with potentially hundreds ...
Read more >
Models - BoTorch
Models play an essential role in Bayesian Optimization (BO). A model is used as a surrogate function for the actual underlying black box...
Read more >
Using a custom BoTorch model in Ax
In this tutorial, we illustrate how to use a custom BoTorch model within Ax's botorch_modular API. This allows us to harness the convenience...
Read more >
Bayesian optimization with input warping - BoTorch
The Warp object is a torch.nn.Module that contains the concentration parameters and applies the warping function in the Model 's forward pass.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found