Skip to main content

Python SDK for model-environment evaluation workflows

Project description

RLMesh

RLMesh is a Python SDK for model-environment evaluation. It serves Gymnasium-style environments, connects clients over local or remote transports, and adapts values for plain Python, NumPy, and Torch users.

Pre-1.0 (0.x): the stable API may change in a minor release, with a migration note, so pin a minor range for active projects.

Installation

Install from PyPI:

pip install rlmesh

Install optional adapters as needed:

pip install "rlmesh[numpy]"
pip install "rlmesh[gymnasium]"
pip install "rlmesh[torch]"

Quickstart

Install RLMesh with Gymnasium support and the NumPy client adapter:

pip install "rlmesh[gymnasium,numpy]"

In one process, serve any Gymnasium-compatible environment:

import gymnasium as gym
import rlmesh

env = gym.make("CartPole-v1")
rlmesh.EnvServer(env, "127.0.0.1:5555").serve()

In another process, connect to it as a remote environment:

from rlmesh.numpy import RemoteEnv

env = RemoteEnv("127.0.0.1:5555")
observation, info = env.reset(seed=0)

terminated = truncated = False
while not (terminated or truncated):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)

env.close()

Runnable examples and exact commands live in the repository under examples/python.

Links

License

Licensed under either of Apache License, Version 2.0 or the MIT license, at your option. See LICENSE-APACHE and LICENSE-MIT.

Python wheels also include third-party notices in THIRD_PARTY_NOTICES.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rlmesh-0.1.0rc1-cp311-abi3-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

rlmesh-0.1.0rc1-cp310-cp310-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file rlmesh-0.1.0rc1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rlmesh-0.1.0rc1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2859071f8308571aec451c317b81e115d0ec53f93af85713e4d17ecda6b43bb
MD5 2459b93a3c9878752fbad1323fbe2a4c
BLAKE2b-256 75de8f61a83f1a3a45dd2088782f7f05db5da34a4a2f74306b7efa772b6708e2

See more details on using hashes here.

File details

Details for the file rlmesh-0.1.0rc1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rlmesh-0.1.0rc1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 86460748ed0b9abb8f8af9f85801cdb2fc94a04781dbd4abd0207e04e3b688a0
MD5 b8ad36f5eff7c968d354ba0204d9add2
BLAKE2b-256 c7a269c5774a7c682f20a5ca3707d3d503a95419632a1b7c7162ac2383cb77b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page