Expand description
IMF v1 zip loading: manifest parse + sha256 member verification
(interscript-models/runtime/src/interscript_ml/loader.py parity,
SPEC.md §3).
Conformance points implemented here:
- C3 — every
.onnxmember is verified against the manifest sha256 map on load; members not covered by the manifest MUST NOT load. - §3 — rejects any other
format, anytokenizerother thanbytes, and missing required members (metadata.yaml,encoder.onnx,decoder.onnx). - Zip-level integrity is never trusted (the manifest decides).
Structs§
- Artifact
Graphs - A loaded, checksum-verified artifact: the manifest plus the verified ONNX graphs keyed by member name.
- Manifest
metadata.yamlas parsed from the artifact (Manifest dataclass parity).
Enums§
- Decoder
Mode decoder: plain | kv— kv iffdecoder-kv.onnxis present.
Functions§
- load_
manifest - Parse
metadata.yamlfrom the artifact zip and enforce the §3 format contract (load_manifest parity). - sha256_
file - Whole-artifact sha256 (streaming; SPEC.md C2 — cache hits are re-verified, never trusted blindly).
- verify_
and_ read - Load and verify every
.onnxmember of an IMF v1 zip.