PreExecInit#

class lsst.ctrl.mpexec.PreExecInit(butler: Butler, taskFactory: TaskFactory, extendRun: bool = False)#

Bases: PreExecInitBase

Initialization 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#

butlerButler

Data butler instance.

taskFactoryTaskFactory

Task factory.

extendRunbool, optional

If True then do not try to overwrite any datasets that might exist in butler.run; instead compare them when appropriate/possible. If False, 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#

graphQuantumGraph

Execution graph.

registerDatasetTypesbool, optional

If True then 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 registerDatasetTypes is False and DatasetType does not exist in registry.