bayesline.api.DatasetAwareSettings#
- pydantic model bayesline.api.DatasetAwareSettings#
Settings bound to a dataset.
Wraps a
Settingssubclass with an explicitdatasetattribute that scopes the settings to a specific underlying dataset. The wrapper is the unit of save/read through the registry: every registry-stored settings is paired with the dataset it applies to.Legacy stored JSON with a flat
{"dataset": ..., ...fields}shape is reshaped on load to the wrapped{"dataset": ..., "setting": {...}}form by the_reshape_legacypre-validator.Show JSON schema
{ "title": "DatasetAwareSettings", "description": "Settings bound to a dataset.\n\nWraps a ``Settings`` subclass with an explicit ``dataset`` attribute that\nscopes the settings to a specific underlying dataset. The wrapper is the\nunit of save/read through the registry: every registry-stored settings is\npaired with the dataset it applies to.\n\nLegacy stored JSON with a flat ``{\"dataset\": ..., ...fields}`` shape is\nreshaped on load to the wrapped ``{\"dataset\": ..., \"setting\": {...}}``\nform by the ``_reshape_legacy`` pre-validator.", "type": "object", "properties": { "dataset": { "description": "The name of the underlying dataset the settings apply to.", "title": "Dataset", "type": "string" }, "setting": { "$ref": "#/$defs/Settings", "description": "The settings scoped to ``dataset``." } }, "$defs": { "Settings": { "additionalProperties": false, "description": "Base class for all settings objects.", "properties": {}, "title": "Settings", "type": "object" } }, "additionalProperties": false, "required": [ "dataset", "setting" ] }
- Config:
frozen: bool = True
extra: str = forbid
- Fields:
dataset (str)setting (bayesline.api._src.settings_base.T_co)
- Validators:
_reshape_legacy»all fields
- field dataset: str [Required]#
The name of the underlying dataset the settings apply to.
- Validated by:
_reshape_legacy
- field setting: T_co [Required]#
The settings scoped to
dataset.- Validated by:
_reshape_legacy