SingleQuantumExecutor¶
- class lsst.ctrl.mpexec.SingleQuantumExecutor(*args, **kwargs)¶
Bases:
SingleQuantumExecutorExecutor class which runs one Quantum at a time.
This is a deprecated backwards-compatibility shim for
lsst.pipe.base.single_quantum_executor.SingleQuantumExecutor, which has the same functionality with very minor interface changes.- Parameters:
- butler
ButlerorNone Data butler,
Nonemeans that Quantum-backed butler should be used instead.- taskFactory
TaskFactory Instance of a task factory.
- skipExistingIn
Any Expressions representing the collections to search for existing output datasets. See Ordered collection searches for allowed types. This class only checks for the presence of butler output run in the list of collections. If the output run is present in the list then the quanta whose complete outputs exist in the output run will be skipped.
Noneor empty string/sequence disables skipping.- clobberOutputs
bool, optional If
True, then outputs from a quantum that exist in output run collection will be removed prior to executing a quantum. IfskipExistingIncontains output run, then only partial outputs from a quantum will be removed. Only used whenbutleris notNone.- enableLsstDebug
bool, optional Enable debugging with
lsstDebugfacility for a task.- limited_butler_factory
Callable, optional A method that creates a
LimitedButlerinstance for a given Quantum. This parameter must be defined ifbutlerisNone. Ifbutleris notNonethen this parameter is ignored.- resources
ExecutionResources, optional The resources available to this quantum when executing.
- skipExisting
bool, optional If
True, skip quanta whose metadata datasets are already stored. UnlikeskipExistingIn, this works with limited butlers as well as full butlers. Always set toTrueifskipExistingInmatchesbutler.run.- assumeNoExistingOutputs
bool, optional If
True, assume preexisting outputs are impossible (e.g. because this is known by higher-level code to be a newRUNcollection), and do not look for them. This causes theskipExistingandclobberOutputsoptions to be ignored, but unlike just setting both of those toFalse, it also avoids all dataset existence checks.- raise_on_partial_outputs
bool, optional If
Trueraise exceptions chained bylsst.pipe.base.AnnotatedPartialOutputErrorimmediately, instead of considering the partial result a success and continuing to run downstream tasks.- job_metadata
Mapping Mapping with extra metadata to embed within the quantum metadata under the “job” key. This is intended to correspond to information common to all quanta being executed in a single process, such as the time taken to load the quantum graph in a BPS job.
- .. deprecated:: v30
The SingleQuantumExecutor class has moved to lsst.pipe.base.single_quantum_executor. This forwarding shim will be removed after v30.
- butler
Attributes Summary
Methods Summary
checkExistingOutputs(quantum, task_node, /, ...)execute(task_node, /, quantum[, quantum_id])Execute single quantum.
initGlobals(quantum)runQuantum(task, quantum, task_node, /, ...)updatedQuantumInputs(quantum, task_node, /, ...)writeMetadata(quantum, metadata, task_node, ...)Attributes Documentation
- assumeNoExistingOutputs¶
- butler¶
- clobberOutputs¶
- enableLsstDebug¶
- job_metadata¶
- limited_butler_factory¶
- raise_on_partial_outputs¶
- resources¶
- skipExisting¶
- taskFactory¶
Methods Documentation
- checkExistingOutputs(quantum: Quantum, task_node: TaskNode, /, limited_butler: LimitedButler) bool¶
- execute(task_node: TaskNode, /, quantum: Quantum, quantum_id: UUID | None = None) tuple[lsst.daf.butler._quantum.Quantum, lsst.pipe.base.quantum_reports.QuantumReport | None]¶
Execute single quantum.
- Parameters:
- Returns:
- quantum
Quantum The quantum actually executed.
- report
QuantumReport Structure describing the status of the execution of a quantum.
Noneis returned if implementation does not support this feature.
- quantum
Notes
Any exception raised by the task or code that wraps task execution is propagated to the caller of this method.
- runQuantum(task: PipelineTask, quantum: Quantum, task_node: TaskNode, /, limited_butler: LimitedButler, quantum_id: uuid.UUID | None = None) tuple[QuantumSuccessCaveats, list[uuid.UUID], ButlerMetrics]¶
- updatedQuantumInputs(quantum: Quantum, task_node: TaskNode, /, limited_butler: LimitedButler) Quantum¶
- writeMetadata(quantum: Quantum, metadata: Any, task_node: TaskNode, /, limited_butler: LimitedButler) None¶