botorch.settings

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.

botorch.settings.suppress_botorch_warnings(suppress)[source]

Set botorch warning filter.

Parameters

state – A boolean indicating whether warnings should be prints

Return type

None

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.