Views
No views yet
1!pip install shimmy
2!pip install gymnasium==0.28.01from gymnasium.wrappers import RecordVideo, RecordEpisodeStatistics
2from huggingface_sb3 import load_from_hub
3from stable_baselines3 import PPO
4
5repo_id = "promila-2024/ppo-LunarLander-v2" # The repo_id
6filename = "ppo-LunarLander-v2.zip" # The model filename.zip
7
8custom_objects = {
9 "learning_rate": 0.0,
10 "lr_schedule": lambda _: 0.0,
11 "clip_range": lambda _: 0.0,
12}
13
14checkpoint = load_from_hub(repo_id, filename)
15model = PPO.load(checkpoint, custom_objects=custom_objects, print_system_info=True)
16