QuantumGraph¶
-
class
lsst.pipe.base.
QuantumGraph
(iterable=None)¶ Bases:
list
QuantumGraph is a sequence of
QuantumGraphTaskNodes
objects.Typically the order of the tasks in the list will be the same as the order of tasks in a pipeline (obviously depends on the code which constructs graph).
Parameters: - iterable : iterable of
QuantumGraphTaskNodes
, optional Initial sequence of per-task nodes.
Methods Summary
append
(object)clear
()copy
()count
(value)extend
(iterable)getDatasetTypes
([initInputs, initOutputs, …])index
(value, [start, [stop]])Raises ValueError if the value is not present. insert
L.insert(index, object) – insert object before index pop
([index])Raises IndexError if list is empty or index is out of range. quanta
()Iterator over quanta in a graph. remove
(value)Raises ValueError if the value is not present. reverse
L.reverse() – reverse IN PLACE sort
([key, reverse])traverse
()Return topologically ordered Quanta and their dependencies. Methods Documentation
-
append
(object) → None -- append object to end¶
-
clear
() → None -- remove all items from L¶
-
copy
() → list -- a shallow copy of L¶
-
count
(value) → integer -- return number of occurrences of value¶
-
extend
(iterable) → None -- extend list by appending elements from the iterable¶
-
getDatasetTypes
(initInputs=True, initOutputs=True, inputs=True, outputs=True)¶
-
index
(value[, start[, stop]]) → integer -- return first index of value.¶ Raises ValueError if the value is not present.
-
insert
()¶ L.insert(index, object) – insert object before index
-
pop
([index]) → item -- remove and return item at index (default last).¶ Raises IndexError if list is empty or index is out of range.
-
quanta
()¶ Iterator over quanta in a graph.
Quanta are returned in unspecified order.
Yields:
-
remove
(value) → None -- remove first occurrence of value.¶ Raises ValueError if the value is not present.
-
reverse
()¶ L.reverse() – reverse IN PLACE
-
sort
(key=None, reverse=False) → None -- stable sort *IN PLACE*¶
-
traverse
()¶ Return topologically ordered Quanta and their dependencies.
This method iterates over all Quanta in topological order, enumerating them during iteration. Returned
QuantumIterData
object contains Quantum instance, itsquantumId
andquantumId
of all its prerequsites (Quanta that produce inputs for this Quantum): - thequantumId
values are generated by an iteration of aQuantumGraph, and are not intrinsic to the QuantumGraph- during iteration, each ID will appear in quantumId before it ever appears in dependencies.
Yields: - quantumData :
QuantumIterData
- iterable : iterable of