Commit
·
eba63b7
1
Parent(s):
76b6b32
Update README.md
Browse files
README.md
CHANGED
@@ -30,8 +30,19 @@ TODO: Add your code
|
|
30 |
|
31 |
|
32 |
```python
|
33 |
-
from stable_baselines3 import
|
|
|
34 |
from huggingface_sb3 import load_from_hub
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
...
|
37 |
```
|
|
|
30 |
|
31 |
|
32 |
```python
|
33 |
+
from stable_baselines3 import PPO
|
34 |
+
from stable_baselines3.common.monitor import Monitor
|
35 |
from huggingface_sb3 import load_from_hub
|
36 |
|
37 |
+
repo_id = "alperenunlu/PPO-LunarLander-v2"
|
38 |
+
filename = "PPO-LunarLander-v2.zip"
|
39 |
+
|
40 |
+
checkpoint = load_from_hub(repo_id, filename)
|
41 |
+
model = PPO.load(checkpoint, print_system_info=True)
|
42 |
+
|
43 |
+
eval_env = Monitor(gym.make("LunarLander-v2", render_mode="human"))
|
44 |
+
|
45 |
+
mean_rwd, std_rwd = evaluate_policy(model, eval_env, n_eval_episodes=10)
|
46 |
+
print(f"mean_reward: {mean_rwd}±{std_rwd}")
|
47 |
...
|
48 |
```
|