MetricsExampleModel¶
- class lsst.daf.butler.tests.MetricsExampleModel(*, summary: dict[str, Any] | None = None, output: dict[str, Any] | None = None, data: list[Any] | None = None)¶
Bases:
BaseModel
A variant of
MetricsExample
based on model.Attributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict
][pydantic.config.ConfigDict].Metadata about the fields defined on the model, mapping of field names to [
FieldInfo
][pydantic.fields.FieldInfo].Methods Summary
from_metrics
(metrics)Create a model based on an example.
Attributes Documentation
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict
][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'data': FieldInfo(annotation=Union[list[Any], NoneType], required=False), 'output': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False), 'summary': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False)}¶
Metadata about the fields defined on the model, mapping of field names to [
FieldInfo
][pydantic.fields.FieldInfo].This replaces
Model.__fields__
from Pydantic V1.
Methods Documentation
- classmethod from_metrics(metrics: MetricsExample) MetricsExampleModel ¶
Create a model based on an example.
- Parameters:
- metrics
MetricsExample
Metrics from which to construct the model.
- metrics
- Returns:
- model
MetricsExampleModel
New model.
- model