ReadEdge#
- class lsst.pipe.base.pipeline_graph.ReadEdge(dataset_type_key: NodeKey, task_key: NodeKey, *, storage_class_name: str, connection_name: str, is_calibration: bool, raw_dimensions: frozenset[str], is_prerequisite: bool, component: str | None, defer_query_constraint: bool)#
Bases:
EdgeRepresentation of an input connection (including init-inputs and prerequisites) in a pipeline graph.
Parameters#
- dataset_type_key
NodeKey Key for the dataset type node this edge is connected to. This should hold the parent dataset type name for component dataset types.
- task_key
NodeKey Key for the task node this edge is connected to.
- storage_class_name
str Name of the dataset type’s storage class as seen by the task.
- connection_name
str Internal name for the connection as seen by the task.
- is_calibration
bool Whether this dataset type can be included in
CALIBRATIONcollections.- raw_dimensions
frozenset[str] Raw dimensions from the connection definition.
- is_prerequisite
bool Whether this dataset must be present in the data repository prior to
QuantumGraphgeneration.- component
strorNone Component of the dataset type requested by the task.
- defer_query_constraint
bool If
True, by default do not include this dataset type’s existence as a constraint on the initial data ID query in QuantumGraph generation.
Notes#
When included in an exported
networkxgraph (e.g.PipelineGraph.make_xgraph), read edges set the following edge attributes:parent_dataset_type_namestorage_class_nameis_initcomponentis_prerequisite
As with
ReadEdgeinstance attributes, these descriptions of dataset types are those specific to a task, and may differ from the graph’s resolved dataset type or (ifPipelineGraph.resolvehas not been called) there may not even be a consistent definition of the dataset type.Attributes Summary
Complete dataset type name, as seen by the task (
str).The directed pair of
NodeKeyinstances this edge connects.Methods Summary
adapt_dataset_ref(ref)Transform the graph's definition of a dataset reference (parent dataset type, with the registry or producer's storage class) to the one seen by this task.
adapt_dataset_type(dataset_type)Transform the graph's definition of a dataset type (parent, with the registry or producer's storage class) to the one seen by this task.
diff(other[, connection_type])Compare this edge to another one from a possibly-different configuration of the same task label.
Attributes Documentation
- dataset_type_name#
Complete dataset type name, as seen by the task (
str).
- nodes#
Methods Documentation
- adapt_dataset_ref(ref: DatasetRef) DatasetRef#
Transform the graph’s definition of a dataset reference (parent dataset type, with the registry or producer’s storage class) to the one seen by this task.
Parameters#
- ref
DatasetRef Graph’s definition of the dataset reference.
Returns#
- out_dataset_ref
DatasetRef Dataset reference seen by this task.
- ref
- adapt_dataset_type(dataset_type: DatasetType) DatasetType#
Transform the graph’s definition of a dataset type (parent, with the registry or producer’s storage class) to the one seen by this task.
Parameters#
- dataset_type
DatasetType Graph’s definition of dataset type.
Returns#
- out_dataset_type
DatasetType Dataset type seen by this task.
- dataset_type
- diff(other: ReadEdge, connection_type: str = 'connection') list[str]#
Compare this edge to another one from a possibly-different configuration of the same task label.
Parameters#
- other
Edge Another edge of the same type to compare to.
- connection_type
str Human-readable name of the connection type of this edge (e.g. “init input”, “output”) for use in returned messages.
Returns#
- differences
list[str] List of string messages describing differences between
selfandother. Will be empty ifself == otheror if the only difference is in the task label or connection name (which are not checked). Messages will use ‘A’ to refer toselfand ‘B’ to refer toother.
- other
- dataset_type_key