Expand description
v1 (APRN) container type definitions — sovereign leaf (issue #2231).
Moved out of aprender-core/src/format/ (types.rs + spec.rs). Uses
crate::error::AprFormatError instead of aprender_core::AprenderError;
aprender-core wraps these errors via impl From<AprFormatError> for AprenderError and re-exports the moved API so existing aprender_core:: format::* paths keep working unchanged.
Byte-identity (issue #2231): the field set and serde derives mirror the
pre-extraction aprender-core types EXACTLY so the on-disk MessagePack
metadata + bincode payload encodings are unchanged (the golden fixtures pin
this for v1 F32).
Structs§
- Distillation
Info - Complete distillation provenance (spec §6.3.2)
- Distillation
Params - Distillation hyperparameters (spec §6.3.2)
- Flags
- Feature flags (bitmask) — spec §3.2.
- Header
- File header (32 bytes).
- Layer
Mapping - Layer mapping for progressive distillation (spec §6.3.2)
- License
Info - Commercial license information (spec §9.1).
- Metadata
- Model metadata (MessagePack-encoded).
- Model
Info - Model information (from inspection).
- Save
Options - Options for saving models.
- Teacher
Provenance - Teacher model provenance for audit trails (spec §6.3.2)
- Training
Info - Training information.
Enums§
- Compression
- Compression algorithm.
- Distill
Method - Distillation method used (spec §6.3.1)
- License
Tier - License tier levels (spec §9.1).
- Model
Type - Model type identifiers.
Constants§
- FORMAT_
VERSION - Current v1 format version (1.0).
- HEADER_
SIZE - v1 header size in bytes.
- MAGIC
- Magic number: “APRN” in ASCII (0x4150524E).
- MAX_
UNCOMPRESSED_ SIZE - Maximum uncompressed size (1GB safety limit — compression-bomb protection).
Functions§
- chrono_
lite_ now - Simple ISO 8601 timestamp (no chrono dependency).