mixle.stats.compute.encoded moduleΒΆ
Metadata wrapper for sequence-encoded data batches.
- class EncodedData(count, payload, engine, nbytes, encoder=None)[source]
Bases:
objectA one-chunk encoded payload with planner-visible metadata.
- Parameters:
- count: int
- payload: Any
- engine: ComputeEngine
- nbytes: int
- encoder: DataSequenceEncoder | None = None
- 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.
- host_payload: Any
- engine_payload: Any
- 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.