Async agents for Stable Baselines 3
Project description
Async Gym Agents
Wrapper environments and agent injectors to allow for drop-in async training.
import gymnasium as gym
from stable_baselines3 import TD3
from async_gym_agents.agents.async_agent import get_injected_agent
from async_gym_agents.envs.multi_env import IndexableMultiEnv
# Create env with 8 parallel envs
env = IndexableMultiEnv([lambda: gym.make("Pendulum-v1") for i in range(8)])
# Create the model, injected with async capabilities
model = get_injected_agent(TD3)("MlpPolicy", env)
# Train the model
model.learn(total_timesteps=10)
# Shut down workers
model.shutdown()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async_gym_agents-0.1.5.tar.gz
(41.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file async_gym_agents-0.1.5.tar.gz.
File metadata
- Download URL: async_gym_agents-0.1.5.tar.gz
- Upload date:
- Size: 41.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.6 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44d0932f79c473adca94797cafd085f34b56b5d94bf613f91e8b6f3fa79515ae
|
|
| MD5 |
57385cf5844e4bdcbc3e4b878843b190
|
|
| BLAKE2b-256 |
850f35f02a826f0411ae2e34b8cb6ab356515a7e2ae71aff7abd07b9e54de368
|
File details
Details for the file async_gym_agents-0.1.5-py3-none-any.whl.
File metadata
- Download URL: async_gym_agents-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.6 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f345bb3cb39ecf5a0f7c1ec22302dff0d49e357f3b437cfa68a1be777858304f
|
|
| MD5 |
c97a98a35ef8a79f22346bbc61092641
|
|
| BLAKE2b-256 |
f3b6b7a9f5cb5df98c1fe6470dc49645403d206509921c32bc7eaabac691440f
|