ProvenanceQuantumGraphWriter¶
- class lsst.pipe.base.quantum_graph.ProvenanceQuantumGraphWriter(output_path: str, *, exit_stack: ~contextlib.ExitStack, log_on_close: ~lsst.pipe.base.log_on_close.LogOnClose, predicted: ~lsst.pipe.base.quantum_graph._predicted.PredictedQuantumGraphComponents | ~lsst.pipe.base.quantum_graph._predicted.PredictedQuantumGraph, zstd_level: int = 10, cdict_data: bytes | None = None, loop_wrapper: ~collections.abc.Callable[[~collections.abc.Iterable[~lsst.pipe.base.quantum_graph._provenance._T]], ~collections.abc.Iterable[~lsst.pipe.base.quantum_graph._provenance._T]] = <function pass_through>, log: ~lsst.utils.logging.LsstLogAdapter | None = None)¶
Bases:
objectA struct of low-level writer objects for the main components of a provenance quantum graph.
- Parameters:
- output_path
str Path to write the graph to.
- exit_stack
contextlib.ExitStack Object that can be used to manage multiple context managers.
- log_on_close
LogOnClose Factory for context managers that log when closed.
- predicted
PredictedQuantumGraphComponents Components of the predicted graph.
- zstd_level
int, optional Compression level.
- cdict_data
bytesorNone, optional Bytes representation of the compression dictionary used by the compressor.
- loop_wrapper
Callable, optional A callable that takes an iterable and returns an equivalent one, to be used in all potentially-large loops. This can be used to add progress reporting or check for cancelation signals.
- log
LsstLogAdapter, optional Logger to use for debug messages.
- output_path
Attributes Summary
Object that should be used to compress all JSON blocks.
Methods Summary
write_init_outputs([assume_existence])Write provenance for init-output datasets and init-quanta.
write_overall_inputs([loop_wrapper])Write provenance for overall-input datasets.
Write package version information to the provenance graph.
write_quantum_provenance(quantum_id, ...)Gather and write provenance for a quantum.
write_scan_data(scan_data)Write the output of a quantum provenance scan to disk.
Attributes Documentation
- compressor¶
Object that should be used to compress all JSON blocks.
Methods Documentation
- write_init_outputs(assume_existence: bool = True) None¶
Write provenance for init-output datasets and init-quanta.
- write_overall_inputs(loop_wrapper: ~collections.abc.Callable[[~collections.abc.Iterable[~lsst.pipe.base.quantum_graph._provenance._T]], ~collections.abc.Iterable[~lsst.pipe.base.quantum_graph._provenance._T]] = <function pass_through>) None¶
Write provenance for overall-input datasets.
- Parameters:
- loop_wrapper
Callable, optional A callable that takes an iterable and returns an equivalent one, to be used in all potentially-large loops. This can be used to add progress reporting or check for cancelation signals.
- loop_wrapper
- write_quantum_provenance(quantum_id: UUID, metadata: TaskMetadata | None, logs: ButlerLogRecords | None) None¶
Gather and write provenance for a quantum.
- Parameters:
- quantum_id
uuid.UUID Unique ID for the quantum.
- metadata
TaskMetadataorNone Task metadata.
- logs
lsst.daf.butler.logging.ButlerLogRecordsorNone Task logs.
- quantum_id
- write_scan_data(scan_data: ProvenanceQuantumScanData) None¶
Write the output of a quantum provenance scan to disk.
- Parameters:
- scan_data
ProvenanceQuantumScanData Result of a quantum provenance scan.
- scan_data