botorch.settings

BoTorch settings.

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

Bases: _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.

Parameters:

state (bool)

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

Bases: _Flag

Flag for printing verbose warnings.

To make sure a warning is only raised in debug mode:
>>> if debug.on():
>>>     warnings.warn(<some warning>)
Parameters:

state (bool)

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

Bases: _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.

Parameters:

state (bool)

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

Parameters:

level (int) – The log level. Defaults to LOG_LEVEL_DEFAULT.

level: int = 50