nat.data_models.optimizable#
Attributes#
Classes#
Functions#
|
Module Contents#
- T#
- class SearchSpace(/, **data: Any)#
Bases:
pydantic.BaseModel,Generic[T]- values: collections.abc.Sequence[T] | None = None#
- model_config#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- validate_search_space_parameters()#
Validate SearchSpace configuration.
- to_grid_values() list[Any]#
Convert SearchSpace to a list of values for GridSampler.
Grid search requires explicit values. This can be provided in two ways: 1. Explicit values: SearchSpace(values=[0.1, 0.5, 0.9]) 2. Range with step: SearchSpace(low=0.1, high=0.9, step=0.2)
For ranges, step is required (no default will be applied) to avoid unintentional combinatorial explosion.
- OptimizableField(
- default: Any = PydanticUndefined,
- *,
- space: SearchSpace | None = None,
- merge_conflict: str = 'overwrite',
- **fld_kw,