fredchung commited on
Commit
2b8e489
·
1 Parent(s): db40e5f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -33,5 +33,17 @@ TODO: Add your code
33
  from stable_baselines3 import ...
34
  from huggingface_sb3 import load_from_hub
35
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ...
37
  ```
 
33
  from stable_baselines3 import ...
34
  from huggingface_sb3 import load_from_hub
35
 
36
+ repo_id = "fredchung/ppo-LunarLander-v2" # The repo_id
37
+ filename = "ppo-LunarLander-v2.zip" # The model filename.zip
38
+
39
+ # For compatibility between pickle protocol 5 vs. 4.
40
+ custom_objects = {
41
+ "learning_rate": 0.0,
42
+ "lr_schedule": lambda _: 0.0,
43
+ "clip_range": lambda _: 0.0,
44
+ }
45
+
46
+ checkpoint = load_from_hub(repo_id, filename)
47
+ model = PPO.load(checkpoint, custom_objects=custom_objects, print_system_info=True)
48
  ...
49
  ```