TaskSubset¶
- class lsst.pipe.base.pipeline_graph.TaskSubset(parent_xgraph: DiGraph, label: str, members: set[str], description: str, step_definitions: StepDefinitions)¶
Bases:
MutableSet
[str
]A specialized set that represents a labeled subset of the tasks in a pipeline graph.
Instances of this class should never be constructed directly; they should only be accessed via the
PipelineGraph.task_subsets
attribute and created by thePipelineGraph.add_task_subset
method.- Parameters:
- parent_xgraph
networkx.DiGraph
Parent networkx graph that this subgraph is part of.
- label
str
Label associated with this subset of the pipeline.
- members
set
[str
] Labels of the tasks that are members of this subset.
- description
str
, optional Description string associated with this labeled subset.
- step_definitions
StepDefinitions
Information about special ‘step’ subsets that partition the pipeline.
- parent_xgraph
Notes
Iteration order is arbitrary, even when the parent pipeline graph is ordered (there is no guarantee that an ordering of the tasks in the graph implies a consistent ordering of subsets).
Attributes Summary
Description string associated with this labeled subset.
The dimensions that can be used to split up this subset's quanta into independent groups.
Whether this subset is a step.
Label associated with this subset of the pipeline.
Methods Summary
add
(value)Add a new task to this subset.
clear
()This is slow (creates N new iterators!) but effective.
discard
(value)Remove a task from the subset if it is present.
isdisjoint
(other)Return True if two sets have a null intersection.
pop
()Return the popped value.
remove
(value)Remove an element.
Attributes Documentation
- description¶
Description string associated with this labeled subset.
- dimensions¶
The dimensions that can be used to split up this subset’s quanta into independent groups.
This is only available if
is_step
isTrue
and only if the pipeline graph has been resolved.
- is_step¶
Whether this subset is a step.
- label¶
Label associated with this subset of the pipeline.
Methods Documentation
- add(value: str) None ¶
Add a new task to this subset.
- Parameters:
- value
str
Label for the task. Must already be present in the parent pipeline graph.
- value
- clear()¶
This is slow (creates N new iterators!) but effective.
- discard(value: str) None ¶
Remove a task from the subset if it is present.
- Parameters:
- value
str
Label for the task. Must already be present in the parent pipeline graph.
- value
- isdisjoint(other)¶
Return True if two sets have a null intersection.
- pop()¶
Return the popped value. Raise KeyError if empty.
- remove(value)¶
Remove an element. If not a member, raise a KeyError.