Skip to main content

Synthetic Gymnax

💡 Make a one-line change ...

Simply replace by
import gymnax
env, params = gymnax.make("CartPole-v1")

...  # your training code
import gymnax, synthetic_gymnax
env, params = gymnax.make("Synthetic-CartPole-v1")
# add 'synthetic' to env:  ^^^^^^^^^^
...  # your training code

💨 ... and enjoy fast training.

The synthetic environments are meta-learned to train agents within 10k time steps. This can be much faster than training in the real environment, even when using tuned hyperparameters!

  • 🟩 Real environment training, using tuned hyperparameters (IQM of 5 training runs)
  • 🟦 Synthetic environment training, using any reasonable hyperparameters (IQM performance of 20 training runs with random HP configurations)

🏅 Performance of agents after training for 10k synthetic steps

Classic control: 10k synthetic 🦶
Environment PPO SAC DQN DDPG TD3
Synthetic-Acrobot-v1 -84.1 -85.3 -82.6 - -
Synthetic-CartPole-v1 500.0 500.0 500.0 - -
Synthetic-Mountaincar-v0 -181.8 -170.1 -118.4 - -
Synthetic-CountinuousMountainCar-v0 66.9 91.1 - 97.6 97.5
Synthetic-Pendulum-v1 -205.4 -188.3 - -164.3 -168.5
Brax: 10k synthetic, 5m real 🦶
Environment PPO SAC DDPG TD3
Synthetic Real Synthetic Real Synthetic Real Synthetic Real
halfcheetah 1657.4 3487.1 5810.4 7735.5 6162.4 3263.3 6555.8 13213.5
hopper 853.5 2521.9 2738.8 3119.4 3012.4 1536.0 2985.3 3325.8
humanoidstandup 13356.1 17243.5 21105.2 23808.1 21039.0 24944.8 20372.0 28376.2
swimmer 348.5 83.6 361.6 124.8 365.1 348.5 365.4 232.2
walker2d 858.3 2039.6 1323.1 4140.1 1304.3 698.3 1321.8 4605.8

💫Replicating our results

We provide the configurations used in meta-training the checkpoints for synthetic environments in synthetic_gymnax/checkpoints/*environment*/config.yaml. They can be used with the meta-learning script by calling e.g.

python examples/metalearn_synthenv.py --config synthetic_gymnax/checkpoints/hopper/config.yaml

Please note that when installing via pip, the configs are not bundled with the package. Please clone the repository to get them.

✍ Citing and more information

If you use the provided synthetic environments in your work, please cite us as

@article{
  ...
}

Metadata

Release files for synthetic-gymnax 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synthetic-gymnax 0.0.1
File Size Uploaded Provenance Actions
synthetic_gymnax-0.0.1.tar.gz 133.4 kB Without provenance Details for synthetic_gymnax-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synthetic-gymnax 0.0.1
File Interpreter ABI Platform Actions
synthetic_gymnax-0.0.1-py3-none-any.whl Python 3 none any Details for synthetic_gymnax-0.0.1-py3-none-any.whl

Total release size: 269.3 kB

Release files / synthetic_gymnax-0.0.1.tar.gz

Download URL synthetic_gymnax-0.0.1.tar.gz
Size 133.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3d6740a9ff0b39233eea2fd9572a58e66b831d63970e99aa9b28e6c7c9120c6a
BLAKE2b-256 checksum
How to use checksums
8725fd504663a143a676c414342f65c2b9b9ba24da76a3e8b8013c860bac3a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / synthetic_gymnax-0.0.1-py3-none-any.whl

Download URL synthetic_gymnax-0.0.1-py3-none-any.whl
Size 135.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bde64190e0b2c75d3726e4b733282195f6725c55451bc78822e836fa5c837e11
BLAKE2b-256 checksum
How to use checksums
91be2d31a447d7c4dbf3dd7e8b27085068c53135348083babe18a278b297cedf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Security for synthetic-gymnax 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page