Views
No views yet
| Metric | Value |
|---|---|
| Mean Return | 1219.24 ± 604.28 |
| Steps Trained | 55,000 |
| Algorithm | SAC |
| Environment | HalfCheetah-v5 |
| Pushed At | 2026-06-07 20:09:36 UTC |
| Repo | dhyuti-n/autorl-sac-halfcheetah-v5-20260607-200936 |
1# pip install stable-baselines3 huggingface_hub gymnasium mujoco imageio
2from huggingface_hub import hf_hub_download
3from stable_baselines3 import SAC
4import gymnasium as gym
5import imageio
6
7# Load the winning model from HuggingFace
8model_path = hf_hub_download(repo_id="dhyuti-n/autorl-sac-halfcheetah-v5-20260607-200936", filename="model.zip")
9model = SAC.load(model_path)
10
11# Record a video rollout
12env = gym.make("HalfCheetah-v5", render_mode="rgb_array")
13obs, _ = env.reset(seed=0)
14frames, done = [], False
15while not done:
16 frames.append(env.render())
17 action, _ = model.predict(obs, deterministic=True)
18 obs, _, terminated, truncated, _ = env.step(action)
19 done = terminated or truncated
20env.close()
21
22imageio.mimsave("rollout.mp4", frames, fps=30)
23print("✓ Saved rollout.mp4")