rlmesh.numpy
NumPy-backed RLMesh clients and tensor helpers.
import rlmesh.numpyThe NumPy backend: the same clients, models, and sandbox sessions as the top-level package, with tensor leaves decoded to NumPy arrays. Space wrappers from these clients sample NumPy-compatible values.
pip install "rlmesh[numpy]"
Conversion semantics
asarray()returns a writable copy, matching Gymnasium, where observations are writable (obs /= 255.0works). For a zero-copy read-only view, usenumpy.from_dlpack(tensor)or the buffer protocol.from_array()always copies: it makes the array C-contiguous and serializes it into a fresh RLMesh tensor.
Classes
- EnvFactoryNumPy-backed
EnvFactory-- the default, named for symmetry. - ModelNumPy-backed model:
predictworks in NumPy values. - RemoteEnvNumPy-backed remote client for a single RLMesh environment.
- RemoteModelNumPy-backed handle to a served model (policy).
- RemoteVectorEnvNumPy-backed remote client for a vectorized RLMesh environment.
- SandboxBuildExperimentalBuild-from-source infrastructure for a sandbox image.
- SandboxEnvExperimentalOwned NumPy-backed sandbox session for one environment.
- SandboxInfoExperimentalInformation about a running RLMesh sandbox container.
- SandboxModelExperimentalA model served from an isolated container.
- SandboxRuntimeExperimentalContainer run-time settings for a sandbox --
docker runflags. - SandboxVectorEnvExperimentalOwned NumPy-backed sandbox session for vectorized environments.
Functions
- asarray()Return a writable NumPy array copied from an RLMesh tensor.
- ensure_available()Raise if NumPy is not installed.
- from_array()Encode a NumPy array or scalar as an RLMesh value.
- space_from_spec()Create a NumPy-adapted space wrapper for a native space spec.