TaskExecutionReport

class lsst.pipe.base.execution_reports.TaskExecutionReport(failed: dict[uuid.UUID, lsst.daf.butler._dataset_ref.DatasetRef] = <factory>, n_succeeded: int = 0, n_expected: int = 0, blocked: dict[uuid.UUID, lsst.daf.butler.dimensions._coordinate.DataCoordinate] = <factory>, output_datasets: dict[str, lsst.pipe.base.execution_reports.DatasetTypeExecutionReport] = <factory>)

Bases: object

A report on the status and content of a task in an executed quantum graph.

Use task metadata to identify and inspect failures and report on output datasets.

See also

QuantumGraphExecutionReport

Quantum graph report.

DatasetTypeExecutionReport

DatasetType report.

Attributes Summary

n_expected

A count of expected quanta.

n_succeeded

A count of successful quanta.

Methods Summary

inspect_quantum(quantum_id, quantum, ...)

Inspect a quantum of a quantum graph and ascertain the status of each associated data product.

to_summary_dict(butler[, do_store_logs, ...])

Summarize the results of the TaskExecutionReport in a dictionary.

Attributes Documentation

n_expected: int = 0

A count of expected quanta.

n_succeeded: int = 0

A count of successful quanta.

This may include quanta that did not produce any datasets; ie, raised NoWorkFound.

Methods Documentation

inspect_quantum(quantum_id: UUID, quantum: Quantum, status_graph: DiGraph, refs: Mapping[str, Mapping[UUID, DatasetRef]], metadata_name: str, log_name: str) None

Inspect a quantum of a quantum graph and ascertain the status of each associated data product.

Parameters:
quantum_iduuid.UUID

Unique identifier for the quantum to inspect.

quantumQuantum

The specific node of the quantum graph to be inspected.

status_graphnetworkx.DiGraph

The quantum graph produced by QuantumGraphExecutionReport.make_reports which steps through the quantum graph of a run and logs the status of each quantum.

refsMapping [ str, Mapping [ uuid.UUID, DatasetRef ] ]

The DatasetRefs of each of the DatasetTypes produced by the task. Includes initialization, intermediate and output data products.

metadata_namestr

The metadata dataset name for the node.

log_namestr

The name of the log files for the node.

to_summary_dict(butler: Butler, do_store_logs: bool = True, human_readable: bool = False) dict[str, Any]

Summarize the results of the TaskExecutionReport in a dictionary.

Parameters:
butlerlsst.daf.butler.Butler

The Butler used for this report.

do_store_logsbool

Store the logs in the summary dictionary.

human_readablebool

Store more human-readable information to be printed out to the command-line.

Returns:
summary_dictdict

A dictionary containing:

  • outputs: A dictionary summarizing the DatasetTypeExecutionReport for each DatasetType associated with the task

  • failed_quanta: A dictionary of quanta which failed and their dataIDs by quantum graph node id

  • n_quanta_blocked: The number of quanta which failed due to upstream failures.

  • n_succeded: The number of quanta which succeeded.

And possibly, if human-readable is passed:

  • errors: A dictionary of data ids associated with each error message. If human-readable and do_store_logs, this is stored here. Otherwise, if do_store_logs, it is stored in failed_quanta keyed by the quantum graph node id.