22 """Module defining quantum graph classes and related methods. 24 There could be different representations of the quantum graph depending 25 on the client needs. Presently this module contains graph implementation 26 which is based on requirements of command-line environment. In the future 27 we could add other implementations and methods to convert between those 32 __all__ = [
"QuantumGraphNodes",
"QuantumGraph"]
52 """QuantumGraphNodes represents a bunch of nodes in an quantum graph. 54 The node in quantum graph is represented by the `PipelineTask` and a 55 single `Quantum` instance. One possible representation of the graph is 56 just a list of nodes without edges (edges can be deduced from nodes' 57 quantum inputs and outputs if needed). That representation can be reduced 58 to the list of PipelineTasks and the corresponding list of Quanta. 59 This class defines this reduced representation. 61 Different frameworks may use different graph representation, this 62 representation was based mostly on requirements of command-line 63 executor which does not need explicit edges information. 67 taskDef : :py:class:`TaskDef` 68 Task defintion for this set of nodes. 69 quanta : `list` of :py:class:`lsst.daf.butler.Quantum` 70 List of quanta corresponding to the task. 78 """QuantumGraph is a sequence of QuantumGraphNodes objects. 80 Typically the order of the tasks in the list will be the same as the 81 order of tasks in a pipeline (obviously depends on the code which 86 iterable : iterable of :py:class:`QuantumGraphNodes` instances, optional 87 Initial sequence of per-task nodes. 90 list.__init__(self, iterable
or [])
97 """Iterator over quanta in a graph. 102 Task definition for a Quantum. 106 for taskNodes
in self:
107 taskDef = taskNodes.taskDef
108 for quantum
in taskNodes.quanta:
109 yield taskDef, quantum
111 def getDatasetTypes(self, initInputs=True, initOutputs=True, inputs=True, outputs=True):
115 total.add(dsRef.datasetType)
118 total.add(dsRef.datasetType)
def __init__(self, taskDef, quanta)
def getDatasetTypes(self, initInputs=True, initOutputs=True, inputs=True, outputs=True)
def __init__(self, iterable=None)