TaskInitNode¶
- class lsst.pipe.base.pipeline_graph.TaskInitNode(key: NodeKey, *, inputs: Mapping[str, ReadEdge], outputs: Mapping[str, WriteEdge], config_output: WriteEdge, imported_data: _TaskNodeImportedData | None = None, task_class_name: str | None = None, config_str: str | None = None)¶
Bases:
objectA node in a pipeline graph that represents the construction of a
PipelineTask.- Parameters:
- inputs
Mapping[str,ReadEdge] Graph edges that represent inputs required just to construct an instance of this task, keyed by connection name.
- outputs~collections.abc.Mapping` [
str,WriteEdge] Graph edges that represent outputs of this task that are available after just constructing it, keyed by connection name.
This does not include the special
config_init_outputedge; useiter_all_outputsto include that, too.- config_output
WriteEdge The special init output edge that persists the task’s configuration.
- imported_data
_TaskNodeImportedData, optional Internal struct that holds information that requires the task class to have been be imported.
- task_class_name
str, optional Fully-qualified name of the task class. Must be provided if
imported_datais not.- config_str
str, optional Configuration for the task as a string of override statements. Must be provided if
imported_datais not.
- inputs
Notes
When included in an exported
networkxgraph (e.g.PipelineGraph.make_xgraph), task initialization nodes set the following node attributes:task_class_namebipartite(seeNodeType.bipartite)task_class(only ifis_importedisTrue)config(only ifis_importdisTrue)
Attributes Summary
Configuration for the task.
Whether this the task type for this node has been imported and its configuration overrides applied.
Label of this configuration of a task in the pipeline.
Type object for the task.
The fully-qualified string name of the task class.
Methods Summary
diff_edges(other)Compare the edges of this task initialization node to those from the same task label in a different pipeline.
Return the configuration for this task as a string of override statements.
Iterate over all inputs required for construction.
Iterate over all outputs available after construction, including special ones.
Attributes Documentation
- config¶
Configuration for the task.
This is always frozen.
Accessing this attribute when
is_importedisFalsewill raiseTaskNotImportedError, but callingget_config_strwill not.
- is_imported¶
Whether this the task type for this node has been imported and its configuration overrides applied.
If this is
False, thetask_classandconfigattributes may not be accessed.
- label¶
Label of this configuration of a task in the pipeline.
- task_class¶
Type object for the task.
Accessing this attribute when
is_importedisFalsewill raiseTaskNotImportedError, but accessingtask_class_namewill not.
- task_class_name¶
The fully-qualified string name of the task class.
Methods Documentation
- diff_edges(other: TaskInitNode) list[str]¶
Compare the edges of this task initialization node to those from the same task label in a different pipeline.
- Parameters:
- other
TaskInitNode Other node to compare to. Must have the same task label, but need not have the same configuration or even the same task class.
- other
- Returns:
- get_config_str() str¶
Return the configuration for this task as a string of override statements.
- Returns:
- config_str
str String containing configuration-overload statements.
- config_str