PredictedQuantumGraphReader¶
- class lsst.pipe.base.quantum_graph.PredictedQuantumGraphReader(header: HeaderModel, pipeline_graph: PipelineGraph, zf: zipfile.ZipFile, decompressor: Decompressor, address_reader: AddressReader, page_size: int)¶
Bases:
BaseQuantumGraphReaderA helper class for reading predicted quantum graphs.
Methods Summary
finish()Construct a
PredictedQuantumGraphinstance from this reader.open(uri, *[, page_size, import_mode])Construct a reader from a URI.
read_all()Read all components in full.
Read all dimension records.
read_execution_quanta([quantum_ids])Read all information needed to execute the given quanta.
Read the list of special quanta that represent init-inputs and init-outputs.
read_quantum_datasets([quantum_ids])Read information about all datasets produced and consumed by the given quantum IDs.
Read the thin graph.
Methods Documentation
- finish() PredictedQuantumGraph¶
Construct a
PredictedQuantumGraphinstance from this reader.
- classmethod open(uri: str | ParseResult | ResourcePath | Path, *, page_size: int = 5000000, import_mode: TaskImportMode = TaskImportMode.ASSUME_CONSISTENT_EDGES) Iterator[PredictedQuantumGraphReader]¶
Construct a reader from a URI.
- Parameters:
- uriconvertible to
lsst.resources.ResourcePath URI to open. Should have a
.qgextension.- page_size
int, optional Approximate number of bytes to read at once from address files. Note that this does not set a page size for all reads, but it does affect the smallest, most numerous reads.
- import_mode
pipeline_graph.TaskImportMode, optional How to handle importing the task classes referenced in the pipeline graph.
- uriconvertible to
- Returns:
- reader
contextlib.AbstractContextManager[PredictedQuantumGraphReader] A context manager that returns the reader when entered.
- reader
- read_all() PredictedQuantumGraphReader¶
Read all components in full.
- read_dimension_data() PredictedQuantumGraphReader¶
Read all dimension records.
Record data IDs will be immediately deserialized, while other fields will be left in serialized form until they are needed.
- read_execution_quanta(quantum_ids: Iterable[UUID] | None = None) PredictedQuantumGraphReader¶
Read all information needed to execute the given quanta.
- read_init_quanta() PredictedQuantumGraphReader¶
Read the list of special quanta that represent init-inputs and init-outputs.
- read_quantum_datasets(quantum_ids: Iterable[UUID] | None = None) PredictedQuantumGraphReader¶
Read information about all datasets produced and consumed by the given quantum IDs.
- read_thin_graph() PredictedQuantumGraphReader¶
Read the thin graph.
The thin graph is a quantum-quantum DAG with internal integer IDs for nodes and just task labels and data IDs as node attributes. It always includes all regular quanta, and does not include init-input or init-output information.