Settings¶
- class baybe.settings.Settings[source]¶
Bases:
_SlottedContextDecoratorBayBE settings.
Public methods
__init__(*[, restore_defaults, ...])Method generated by attrs for class Settings.
activate()Activate the settings globally.
overwrite(target[, keep_random_state])Overwrite the settings of another
Settingsobject.Restore the previous settings.
Public attributes and properties
Controls if
Campaignobjects cache their latest set of recommendations.The directory used for persistent caching on disk.
Controls if simulation runs with xyzpy are executed in parallel.
Controls if incoming user dataframes are preprocessed (i.e., dtype-converted and validated) before use.
The used random seed.
Controls the floating point precision used for numpy arrays.
Controls the floating point precision used for torch tensors.
The floating point precision used for
numpyarrays.The floating point precision used for
torchtensors.Indicates if
fpsampleis enabled (i.e., installed and set to be used).Indicates if
polarsis enabled (i.e., installed and set to be used).- __init__(*, restore_defaults: bool = False, restore_environment: bool = False, cache_campaign_recommendations: bool = NOTHING, cache_directory: str | Path | None = NOTHING, parallelize_simulation_runs: bool = NOTHING, preprocess_dataframes: bool = NOTHING, random_seed: int | None = None, use_fpsample: AutoBool | bool | str | None = NOTHING, use_polars_for_constraints: AutoBool | bool | str | None = NOTHING, use_single_precision_numpy: bool = NOTHING, use_single_precision_torch: bool = NOTHING)¶
Method generated by attrs for class Settings.
For details on the parameters, see Public attributes and properties.
- overwrite(target: Settings, keep_random_state: bool = False)[source]¶
Overwrite the settings of another
Settingsobject.- Return type:
-
cache_campaign_recommendations:
bool¶ Controls if
Campaignobjects cache their latest set of recommendations.
-
cache_directory:
Path|None¶ The directory used for persistent caching on disk. Set to
""orNoneto disable caching.
-
preprocess_dataframes:
bool¶ Controls if incoming user dataframes are preprocessed (i.e., dtype-converted and validated) before use.