rlmesh.adapters.resolve_from_contract
Derive an Adapter from an env contract and a model spec.
resolve_from_contract(
contract: EnvContract,
model_spec: ModelSpec,
*,
trust_entrypoints: bool = False,
check_inverse: bool = True,
) -> AdapterReads the env’s tags from its contract metadata (published under
ENV_METADATA_KEY by a server set up with
rlmesh.adapters.tag()) and its observation/action spaces from
the contract, then resolves as in resolve().
Parameters
| Name | Type | Description |
|---|---|---|
contract | EnvContract | The environment contract (e.g. remote_env.env_contract). |
model_spec | ModelSpec | The model's declared input/output format. |
trust_entrypoints | bool | See resolve(). |
check_inverse | bool | See resolve(). |
Raises
| Type | Description |
|---|---|
AdapterResolutionError | If the contract carries no tags, or resolution fails. |