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: - object- A node in a pipeline graph that represents the construction of a - PipelineTask.- Parameters:
- keyNodeKey
- Key that identifies this node in internal and exported networkx graphs. 
- inputsMapping[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; use- iter_all_outputsto include that, too.
- config_outputWriteEdge
- 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_namestr, optional
- Fully-qualified name of the task class. Must be provided if - imported_datais not.
- config_strstr, optional
- Configuration for the task as a string of override statements. Must be provided if - imported_datais not.
 
- key
 - Notes - When included in an exported - networkxgraph (e.g.- PipelineGraph.make_xgraph), task initialization nodes set the following node attributes:- task_class_name
- bipartite(see- NodeType.bipartite)
- task_class(only if- is_importedis- True)
- config(only if- is_importedis- True)
 - 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_importedis- Falsewill raise- TaskNotImportedError, but calling- get_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, the- task_classand- configattributes 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_importedis- Falsewill raise- TaskNotImportedError, but accessing- task_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:
- otherTaskInitNode
- 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_strstr
- String containing configuration-overload statements. 
 
- config_str
 
 - iter_all_inputs() Iterator[ReadEdge]¶
- Iterate over all inputs required for construction. - This is the same as iteration over - inputs.values(), but it will be updated to include any automatic init-input connections added in the future, while- inputswill continue to hold only task-defined init inputs.- Yields:
- ReadEdge
- All the inputs required for construction.