solprop.output.scan_artifacts#
A durable queue’s per-point artifact files, written and read without any pickle.
A worker of solprop.driver.executors.queue.Queue writes each point’s
PointResult to its own HDF5 artifact
(write_artifact(), fsynced before its name is published) and records its
artifact_digest(); collection reads it back with read_artifact(), which
checks that digest, the scan, point and owner identity and the artifact schema
(version 2). Artifacts hold JSON and numerical datasets only, never executable pickle
payloads; the manual page is
docs/guide/workflows/scans.md (“Durable queues and Slurm”).
Functions
|
Hash a complete artifact with bounded memory. |
|
Validate and read a durable point without unpickling executable content. |
|
Write and fsync one private artifact before publishing its filename. |
- solprop.output.scan_artifacts.artifact_digest(path)[source]#
Hash a complete artifact with bounded memory.
- Parameters:
- pathpathlib.Path
Closed artifact file.
- Returns:
- str
SHA-256 of the exact file bytes.
- solprop.output.scan_artifacts.read_artifact(path, identity, *, digest=None)[source]#
Validate and read a durable point without unpickling executable content.
- Parameters:
- pathpathlib.Path
Published artifact file.
- identitymapping
Required scan, point and optional owner identifiers.
- digeststr or None, optional
Expected digest from the durable queue state.
- Returns:
- PointResult
Validated result with host arrays.
- Raises:
- OutputError
If the file is from another scan, point or owner, or its digest changed.
- solprop.output.scan_artifacts.write_artifact(path, result, identity)[source]#
Write and fsync one private artifact before publishing its filename.
- Parameters:
- pathpathlib.Path
Unique, unpublished worker-local filename on the shared filesystem.
- resultPointResult
Complete successful or failed point result.
- identitymapping
Scan digest, point digest and ownership token.
- Raises:
- OutputError
If the status or successful payload violates its contract.