rlmesh.adapters.Custom

classfrom rlmesh.adapters import Custom[source]

A custom input computed by host-language code.

Custom(
    transform: ObsTransform | None = None,
    entrypoint: str | None = None,
)

Exactly one of transform (an in-process callable) or entrypoint (a module:callable string) is set:

  • transform: local only – the callable cannot be serialized, so a model spec carrying it cannot be published in contract metadata.
  • entrypoint: serializable and publishable as wire form, but imported only when resolve(..., trust_entrypoints=True); otherwise resolution refuses to import it. Travels on the wire under the key transform.

There is no key – placement in the input tree is the payload position.

The callable receives the raw observation as a mapping: the observation itself for a Dict env, or the single-leaf envelope {"<obs>": leaf} for a flat (non-Dict) env.

transform

attribute[source]
transform: ObsTransform | None

An in-process callable taking the raw observation mapping.

entrypoint

attribute[source]
entrypoint: str | None

A module:callable string.