Downloads · 30 days
8
6% of all-time downloads
caragones/ppo-lunarlander-best
ppo-lunarlander-best is a reinforcement learning model from caragones. 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. The card lists the license as mit.
Trained with Stable-Baselines3 (PPO). VecNormalize stats per checkpoint were not preserved; evaluation may differ slightly across machines.
Downloads · 30 days
8
6% of all-time downloads
All-time downloads
125
Public
Repo size
370 KB
Likes
0
Public
Click a slice to open those files.
.zip157 KB · 57%
From the Hugging Face model README
Trained with Stable-Baselines3 (PPO). VecNormalize stats per checkpoint were not preserved; evaluation may differ slightly across machines.
best_model.zip: SB3 model (policy + hyperparameters)vecnormalize.pkl: (optional) observation-normalization stats, if availableimport gymnasium as gym
from stable_baselines3 import PPO
from stable_baselines3.common.monitor import Monitor
from stable_baselines3.common.vec_env import DummyVecEnv, VecNormalize
def make_env(seed=0):
def _init():
env = gym.make("LunarLander-v2")
env.reset(seed=seed)
return Monitor(env)
return _init
venv = DummyVecEnv([make_env(1234)])
try:
env = VecNormalize.load("vecnormalize.pkl", venv)
except Exception:
env = VecNormalize(venv, norm_obs=True, norm_reward=False, clip_obs=10.0)
env.training = False
env.norm_reward = False
model = PPO.load("best_model.zip", env=env, device="cpu")