SerializedQuantum¶
- class lsst.daf.butler.SerializedQuantum(*, taskName: str | None = None, dataId: SerializedDataCoordinate | None = None, datasetTypeMapping: Mapping[str, SerializedDatasetType], initInputs: Mapping[str, tuple[lsst.daf.butler._dataset_ref.SerializedDatasetRef, list[int]]], inputs: Mapping[str, list[tuple[lsst.daf.butler._dataset_ref.SerializedDatasetRef, list[int]]]], outputs: Mapping[str, list[tuple[lsst.daf.butler._dataset_ref.SerializedDatasetRef, list[int]]]], dimensionRecords: dict[int, lsst.daf.butler.dimensions._records.SerializedDimensionRecord] | None = None, datastoreRecords: dict[str, lsst.daf.butler.datastore.record_data.SerializedDatastoreRecordData] | None = None)¶
Bases:
BaseModel
Simplified model of a
Quantum
suitable for serialization.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
direct
(*, taskName, dataId, ...)Construct a
SerializedQuantum
directly without validators.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]] = {'dataId': FieldInfo(annotation=Union[SerializedDataCoordinate, NoneType], required=False), 'datasetTypeMapping': FieldInfo(annotation=Mapping[str, SerializedDatasetType], required=True), 'datastoreRecords': FieldInfo(annotation=Union[dict[str, SerializedDatastoreRecordData], NoneType], required=False), 'dimensionRecords': FieldInfo(annotation=Union[dict[int, SerializedDimensionRecord], NoneType], required=False), 'initInputs': FieldInfo(annotation=Mapping[str, tuple[SerializedDatasetRef, list[int]]], required=True), 'inputs': FieldInfo(annotation=Mapping[str, list[tuple[SerializedDatasetRef, list[int]]]], required=True), 'outputs': FieldInfo(annotation=Mapping[str, list[tuple[SerializedDatasetRef, list[int]]]], required=True), 'taskName': FieldInfo(annotation=Union[str, 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 direct(*, taskName: str | None, dataId: dict | None, datasetTypeMapping: Mapping[str, dict], initInputs: Mapping[str, tuple[dict, list[int]]], inputs: Mapping[str, list[tuple[dict, list[int]]]], outputs: Mapping[str, list[tuple[dict, list[int]]]], dimensionRecords: dict[int, dict] | None, datastoreRecords: dict[str, dict] | None) SerializedQuantum ¶
Construct a
SerializedQuantum
directly without validators.- Parameters:
- taskName
str
orNone
The name of the task.
- dataId
dict
orNone
The dataId of the quantum.
- datasetTypeMapping
Mapping
[str
,dict
] Dataset type definitions.
- initInputs
Mapping
The quantum init inputs.
- inputs
Mapping
The quantum inputs.
- outputs
Mapping
The quantum outputs.
- dimensionRecords
dict
[int
,dict
] orNone
The dimension records.
- datastoreRecords
dict
[str
,dict
] orNone
The datastore records.
- taskName
- Returns:
- quantum
SerializedQuantum
Serializable model of the quantum.
- quantum
Notes
This differs from the pydantic “construct” method in that the arguments are explicitly what the model requires, and it will recurse through members, constructing them from their corresponding
direct
methods.This method should only be called when the inputs are trusted.