rlmesh.numpy.EnvFactory
NumPy-backed EnvFactory -- the default, named for symmetry.
Equivalent to subclassing rlmesh.EnvFactory; the served env’s
obs/action seam stays on the default numpy/Auto path. Provided so rlmesh.numpy
carries the env-author class next to Model, matching rlmesh.torch /
rlmesh.jax.
Attributes
Methods
- tags_for()Return the
EnvTagsfor one discriminant binding. - prepare()Optional: one-time setup before
make(). - describe()Return this factory's full metadata envelope (see
rlmesh.describe()). - make()Construct and return the environment.
- close()Optional: release resources.
- serve()Host this env on
address(blocking):prepare()+make(**make_kwargs), publishtags.
params
attribute[source]params: ParamSpec | Nonetag_params
attribute[source]tag_params: tuple[str, ...]reset_options
attribute[source]reset_options: tuple[str, ...]workflow_edition
attribute[source]workflow_edition: str | Noneprepare
function[source]prepare() -> NoneOptional: one-time setup before make().
describe
function[source]describe() -> dict[str, Any]Return this factory’s full metadata envelope (see rlmesh.describe()).
make
function[source]make(**kwargs: Any) -> EnvLike[Any, Any]Construct and return the environment.
Your override returns a plain env; the returned env is automatically
stamped with this factory’s tags (in env.metadata), so the tag
rides the environment – a spec’d model can resolve its adapter from the
env alone, whether it is served or driven locally via
rlmesh.session().
close
function[source]close() -> NoneOptional: release resources.
serve
function[source]serve(
address: str,
*,
num_envs: int = 1,
vectorization_mode: str | None = None,
framework: str | None = None,
device: object | None = None,
workflow_edition: str | None = None,
**make_kwargs: Any,
) -> NoneHost this env on address (blocking): prepare() + make(**make_kwargs), publish tags.
The named keywords are serving options, forwarded to
rlmesh.serve.serve_env() (num_envs > 1 fans make out into a
vector env; framework/device type and place the served obs/action
seam; workflow_edition overrides this class’s
workflow_edition declaration for this endpoint); every other
keyword goes to make. Naming them here keeps a make
kwarg from silently binding to a serving option – a make parameter that
shares a serving option’s name cannot ride through serve.