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.3.tar.gz
(40.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.3.tar.gz.
File metadata
- Download URL: async_gym_agents-0.1.3.tar.gz
- Upload date:
- Size: 40.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 |
13aeb9973414fcacaa9a66bcd4a0f2fcd67f84f2cc7a32fee703053dcb153941
|
|
| MD5 |
b80e7d8e2cfe5b392481266167e331df
|
|
| BLAKE2b-256 |
5860197c487093cd4650d63bd89a1293df84c7cdf91023ab7bf03f21dc66202d
|
File details
Details for the file async_gym_agents-0.1.3-py3-none-any.whl.
File metadata
- Download URL: async_gym_agents-0.1.3-py3-none-any.whl
- Upload date:
- Size: 14.5 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 |
737a9d73ec8654af706c3a37c20324f2d983d5ebdf7f74e457681c079a4117be
|
|
| MD5 |
3d63fc7e5a189ec517b3ade2b537fcf7
|
|
| BLAKE2b-256 |
67ceff9d68367740a01570ee7f6320986b8ca390b450603f407fc7e8ec3a6593
|