mixle.data.encoded_io module¶
Serialize encoded (seq_encode) data to disk, so an expensive encode is done once and reused.
seq_encode turns raw records into an encoder-specific payload (nested tuples of NumPy arrays). Fitting
re-encodes every call; for large datasets that is the dominant cost. save_encoded/load_encoded
persist the encoded payload (with an integrity digest and the encoder’s identity) so subsequent fits load
it directly. Format is pickle (the payloads are internal numeric structures); a content digest is stored
and verified on load, and the encoder’s class name is recorded so a payload is not silently loaded against
a mismatched encoder.
- save_encoded(encoded, path, *, encoder=None)[source]
Write
encoded(the output ofencoder.seq_encode(...)) topath; return its hex digest.encoder(optional) records the encoder class so a load against a different encoder is flagged.