PreExecInit#
- class lsst.ctrl.mpexec.PreExecInit(butler: Butler, taskFactory: TaskFactory, extendRun: bool = False)#
Bases:
PreExecInitBaseInitialization of registry for QuantumGraph execution.
This class encapsulates all necessary operations that have to be performed on butler and registry to prepare them for QuantumGraph execution.
Parameters#
- butler
Butler Data butler instance.
- taskFactory
TaskFactory Task factory.
- extendRun
bool, optional If
Truethen do not try to overwrite any datasets that might exist inbutler.run; instead compare them when appropriate/possible. IfFalse, then any existing conflicting dataset will cause a butler exception to be raised.
Methods Summary
initializeDatasetTypes(graph[, ...])Save or check DatasetTypes output by the tasks in a graph.
Methods Documentation
- initializeDatasetTypes(graph: QuantumGraph, registerDatasetTypes: bool = False) None#
Save or check DatasetTypes output by the tasks in a graph.
Iterates over all DatasetTypes for all tasks in a graph and either tries to add them to registry or compares them to existing ones.
Parameters#
- graph
QuantumGraph Execution graph.
- registerDatasetTypes
bool, optional If
Truethen register dataset types in registry, otherwise they must be already registered.
Raises#
- ValueError
Raised if existing DatasetType is different from DatasetType in a graph.
- KeyError
Raised if
registerDatasetTypesisFalseand DatasetType does not exist in registry.
- graph
- butler