BoTorch settings.

class botorch.settings.propagate_grads(state=True)[source]

Bases: botorch.settings._Flag

Flag for propagating gradients to model training inputs / training data.

When set to True, gradients will be propagated to the training inputs. This is useful in particular for propating gradients through fantasy models.


Set botorch warning filter.


state – A boolean indicating whether warnings should be prints

Return type


class botorch.settings.debug(state=True)[source]

Bases: botorch.settings._Flag

Flag for printing verbose BotorchWarnings.

When set to True, verbose BotorchWarning`s will be printed for debuggability. Warnings that are not subclasses of `BotorchWarning will not be affected by this context_manager.

class botorch.settings.validate_input_scaling(state=True)[source]

Bases: botorch.settings._Flag

Flag for validating input normalization/standardization.

When set to True, standard botorch models will validate (up to reasonable tolerance) that (i) none of the inputs contain NaN values (ii) the training data (train_X) is normalized to the unit cube (iii) the training targets (train_Y) are standardized (zero mean, unit var) No checks (other than the NaN check) are performed for observed variances (train_Y_var) at this point.

class botorch.settings.log_level(level=50)[source]

Bases: object

Flag for printing verbose logging statements.

Applies the given level to logging.getLogger(‘botorch’) calls. For instance, when set to logging.INFO, all logger calls of level INFO or above will be printed to STDERR

level: int = 50