ommx.experiment.attachments#

Typed helpers for Experiment attachments.

OMMX stores Experiment attachments as media-typed bytes. Provider packages that own richer Python objects can implement AttachmentCodec to define how those objects are encoded into attachment bytes and decoded back.

Attributes#

T

Classes#

AttachmentCodec

Codec for one Python attachment payload type.

Module Contents#

class AttachmentCodec#

Codec for one Python attachment payload type.

The codec implementation should live with the package that owns T. For example, a JijModeling Problem codec belongs in jijmodeling, not in OMMX.

static decode(data: bytes, /) → T#

Decode attachment bytes back to a Python object.

static encode(value: T, /) → bytes#

Encode a Python object to attachment bytes.

media_type: str#

OCI media type used for this attachment payload.

T#