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
A dictionary of computed field names and their corresponding
ComputedFieldInfo
objects.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_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding
ComputedFieldInfo
objects.
- 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, default=None), 'output': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None), 'summary': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None)}¶
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