rlmesh.adapters.CustomEncoding
A rotation packing layered on a known native base encoding.
CustomEncoding(
base: RotationEncoding,
from_base: RotationTransform | str | None = None,
to_base: RotationTransform | str | None = None,
name: str = 'custom',
)The two arms mirror the native encode/decode pair; each is required only on
the side it is used (validated at resolve time). The packing must preserve
the base width (ROTATION_DIMS[base]).
Attributes
- baseThe native encoding the field resolves as.
- from_base
base -> custom, used when the encoding tags an observation (model) state component. - to_base
custom -> base, used when the encoding tags an action component. - nameDisplay name surfaced in
Adapter.describe(). - is_entrypointWhether the arms are
module:callablestrings (serializable). - widthElement width of the base (and therefore custom) encoding.
base
attribute[source]base: RotationEncodingThe native encoding the field resolves as.
from_base
attribute[source]from_base: RotationTransform | str | Nonebase -> custom, used when the encoding tags an observation (model) state component. An in-process callable (runs locally, serializes to a <local> marker), or a "module:callable" entrypoint string (a describe-only reference; its execution is deferred). None when action-only.
to_base
attribute[source]to_base: RotationTransform | str | Nonecustom -> base, used when the encoding tags an action component. A callable or entrypoint string (see from_base). None when obs-only.
name
attribute[source]name: strDisplay name surfaced in Adapter.describe().
is_entrypoint
property[source]property is_entrypoint: boolWhether the arms are module:callable strings (serializable).
width
property[source]property width: intElement width of the base (and therefore custom) encoding.