Downloads · 30 days
0
0% of all-time downloads
arabellako22/ppo-pusher-v5-vecnormalize
ppo-pusher-v5-vecnormalize is a reinforcement learning model from arabellako22. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3.
This repository contains the best evaluation checkpoint from a Stable-Baselines3 PPO training run on Gymnasium Pusher-v5.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
21
Public
Repo size
1.8 MB
Likes
0
Public
Click a slice to open those files.
.zip1.8 MB · 95%
From the Hugging Face model README
This repository contains the best evaluation checkpoint from a
Stable-Baselines3 PPO training run on Gymnasium Pusher-v5.
The checkpoint passed both release gates:
trained mean reward > random-policy mean reward| Metric | Result |
|---|---|
| Trained PPO mean reward | -28.93 |
| Trained PPO standard deviation | 3.67 |
| PPO evaluation episodes | 30 |
| Random mean reward | -148.67 |
| Random standard deviation | 7.58 |
| Random evaluation episodes | 30 |
| Improvement over random | 119.74 |
| Success criterion passed | True |
| Replay reward verified | True |
| Rendering backend | egl |
| Replay frames | 101 |
For Pusher-v5, rewards are negative; values closer to zero are better.
| Item | Value |
|---|---|
| Device | cpu |
| Seed | 42 |
| Vectorized environments | 4 |
| Requested timesteps | 1000000 |
| Actual timesteps | 1007616 |
| Selected checkpoint | best_evaluation_checkpoint |
| Callback best reward | -25.909009299999997 |
| Evaluation interval | 50000 |
| Learning-rate schedule | 3e-4 to 3e-5 linear |
| Policy network | 256 x 256 ReLU |
| Value network | 256 x 256 ReLU |
| gSDE | True |
| Batch size | 256 |
| Target KL | 0.03 |
| File | Purpose |
|---|---|
ppo-Pusher-v5.zip | Best PPO evaluation checkpoint |
vec_normalize.pkl | Matching VecNormalize statistics |
training_config.json | Complete training configuration |
evaluation.json | Final evaluation and replay verification |
evaluations.npz | EvalCallback history |
replay.mp4 | Deterministic policy replay |
requirements.txt | Reproduction dependencies |
<video controls loop muted playsinline src="replay.mp4"></video>
from stable_baselines3 import PPO
from stable_baselines3.common.env_util import make_vec_env
from stable_baselines3.common.vec_env import VecNormalize
env = make_vec_env(
"Pusher-v5",
n_envs=1,
)
env = VecNormalize.load(
"vec_normalize.pkl",
env,
)
env.training = False
env.norm_reward = False
model = PPO.load(
"ppo-Pusher-v5.zip",
env=env,
device="cpu",
)
obs = env.reset()
for step in range(100):
action, state = model.predict(
obs,
deterministic=True,
)
obs, rewards, dones, infos = env.step(action)
env.close()
The VecNormalize statistics must be loaded with the PPO checkpoint. Raw observations will not reproduce the reported result.
The evaluation and action-generation process imports Stable-Baselines3 but performs no rendering. A separate MuJoCo-only process replays the deterministic actions using the same seed. This prevents native OpenGL conflicts in headless Colab runtimes.
1.3.02.9.03.12.02.1.32.11.0+cpu2.37.4The safe_mujoco_render.py module packages the subprocess-isolated evaluation and rendering workflow for other Gymnasium MuJoCo environments.
Supported configuration:
from safe_mujoco_render import (
evaluate_and_render_ppo_mujoco,
)
result = evaluate_and_render_ppo_mujoco(
env_id="Pusher-v5",
model_path="ppo-Pusher-v5.zip",
vecnormalize_path="vec_normalize.pkl",
video_path="replay_from_module.mp4",
device="cpu",
n_eval_episodes=30,
n_random_episodes=30,
eval_seed=1000,
random_seed=2000,
replay_seed=42,
width=640,
height=480,
backends=("egl", "osmesa"),
)
print(result)
Set video_path=None to validate frame generation without writing a video file. The function raises an exception if evaluation and rendering replay rewards do not match.