ProvenanceQuantumGraph¶
- class lsst.pipe.base.quantum_graph.ProvenanceQuantumGraph(header: HeaderModel, pipeline_graph: PipelineGraph)¶
Bases:
BaseQuantumGraphA quantum graph that represents processing that has already been executed.
- Parameters:
- header
HeaderModel General metadata shared with other quantum graph types.
- pipeline_graph
pipeline_graph.PipelineGraph Graph of tasks and dataset types. May contain a superset of the tasks and dataset types that actually have quanta and datasets in the quantum graph.
- header
Notes
A provenance quantum graph is generally obtained via the
ProvenanceQuantumGraphReader.graphattribute, which is updated in-place as information is read from disk.Attributes Summary
A directed acyclic graph with quantum and dataset nodes.
A nested mapping of all datasets, keyed first by dataset type name and then by data ID.
A mapping from task label to the ID of the special init quantum for that task.
A nested mapping of all quanta, keyed first by task name and then by data ID.
A directed acyclic graph with quanta as nodes (and datasets elided).
Methods Summary
Construct an
astropy.table.Tablewith counts for each exception type raised by each task.Construct an
astropy.table.Tablewith a tabular summary of the quanta.make_task_resource_usage_table(task_label[, ...])Make a table of resource usage for a single task.
Attributes Documentation
- bipartite_xgraph¶
A directed acyclic graph with quantum and dataset nodes.
Notes
Node keys are quantum or dataset UUIDs, and are populated one quantum or dataset at a time as they are loaded. Loading quanta (via
ProvenanceQuantumGraphReader.read_quanta) or datasets (viaProvenanceQuantumGraphReader.read_datasets) will load those nodes with full attributes and edges to adjacent nodes with no attributes. Loading quanta necessary to populate edge attributes.Node attributes are described by the
ProvenanceQuantumInfo,ProvenanceInitQuantumInfo, andProvenanceDatasetInfotypes.This graph includes init-input and init-output datasets, but it does not reflect the dependency between each task’s special “init” quantum and its runtime quanta (as this would require edges between quanta, and that would break the “bipartite” property).
The returned object is a read-only view of an internal one.
- datasets_by_type¶
A nested mapping of all datasets, keyed first by dataset type name and then by data ID.
Notes
This is populated one dataset at a time as they are read. All dataset types in the pipeline graph are included, even if none of their datasets were loaded (i.e. nested mappings may be empty).
The returned object may be an internal dictionary; as the type annotation indicates, it should not be modified in place.
- init_quanta¶
A mapping from task label to the ID of the special init quantum for that task.
This is populated by the
init_quantacomponent. Additional information about each init quantum can be found by using the ID to look up node attributes in thebipartite_xgraph, i.e.:info: ProvenanceInitQuantumInfo = qg.bipartite_xgraph.nodes[id]
- quanta_by_task¶
A nested mapping of all quanta, keyed first by task name and then by data ID.
Notes
This is populated one quantum at a time as they are read. All tasks in the pipeline graph are included, even if none of their quanta were loaded (i.e. nested mappings may be empty).
The returned object may be an internal dictionary; as the type annotation indicates, it should not be modified in place.
- quantum_only_xgraph¶
A directed acyclic graph with quanta as nodes (and datasets elided).
Notes
Node keys are quantum UUIDs, and are populated one quantum at a time as they are loaded. Loading quanta (via
ProvenanceQuantumGraphReader.read_quanta) will add the loaded nodes with full attributes and add edges to adjacent nodes with no attributes. Loading datasets (viaProvenanceQuantumGraphReader.read_datasets) will also add edges and nodes with no attributes.Node attributes are described by the
ProvenanceQuantumInfotypes.This graph does not include special “init” quanta.
The returned object is a read-only view of an internal one.
Methods Documentation
- make_exception_table() Table¶
Construct an
astropy.table.Tablewith counts for each exception type raised by each task.At present this only includes information from partial-outputs-error successes, since exception information for failures is not tracked. This may change in the future.
- Returns:
- table
astropy.table.Table A table with columns for task label, exception type, and counts.
- table
- make_quantum_table() Table¶
Construct an
astropy.table.Tablewith a tabular summary of the quanta.- Returns:
- table
astropy.table.Table A table view of the quantum information. This only includes counts of status categories and caveats, not any per-data-ID detail.
- table
Notes
Success caveats in the table are represented by their
conciseform, so when pretty-printing this table for users, thelegendshould generally be printed as well.
- make_task_resource_usage_table(task_label: str, include_data_ids: bool = False) Table¶
Make a table of resource usage for a single task.
- Parameters:
- Returns:
- table
astropy.table.Table A table with columns for quantum ID and all fields in
QuantumResourceUsage.
- table