mixle.stats.compute.encoded moduleΒΆ
Metadata wrappers and transfer helpers for sequence-encoded data batches.
The module attaches count, byte-size, encoder, and engine metadata to encoded payloads and moves numeric fields to resident engines without disturbing object or string metadata.
- class EncodedData(count, payload, engine, nbytes, encoder=None)[source]
Bases:
objectA one-chunk encoded payload with planner-visible metadata.
- Parameters:
- classmethod from_payload(payload, count, encoder=None, engine=None)[source]
Wrap an already encoded payload with count, engine, and byte metadata.
- class ResidentEncodedPayload(host_payload, engine_payload)[source]
Bases:
objectPair a host encoding with a resident engine encoding for one chunk.
- as_encoded_data(payload, count, encoder=None, engine=None)[source]
Wrap an existing encoded payload with count, engine, and byte metadata.
- move_encoded_payload(payload, engine)[source]
Move numeric encoded arrays into
enginewhile preserving object fields.Encoders remain backend-agnostic and produce their historical Python/NumPy payloads. Orchestrators can call this exactly once after encoding a shard so scoring kernels see resident engine arrays. Object/string arrays and non-array Python metadata stay on the host because many distribution encodings intentionally carry labels, maps, or structural metadata.