Commit
·
a7b99d9
1
Parent(s):
a947d36
Update README.md
Browse files
README.md
CHANGED
|
@@ -26,12 +26,21 @@ This is a trained model of a **PPO** agent playing **LunarLander-v2**
|
|
| 26 |
using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3).
|
| 27 |
|
| 28 |
## Usage (with Stable-baselines3)
|
| 29 |
-
TODO: Add your code
|
| 30 |
|
| 31 |
|
| 32 |
```python
|
| 33 |
from stable_baselines3 import ...
|
| 34 |
from huggingface_sb3 import load_from_hub
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
...
|
| 37 |
```
|
|
|
|
| 26 |
using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3).
|
| 27 |
|
| 28 |
## Usage (with Stable-baselines3)
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
```python
|
| 32 |
from stable_baselines3 import ...
|
| 33 |
from huggingface_sb3 import load_from_hub
|
| 34 |
|
| 35 |
+
repo_id = "osbm/ppo-LunarLander-v2-2"
|
| 36 |
+
filename = "ppo-LunarLander-v2.zip"
|
| 37 |
+
custom_objects = {
|
| 38 |
+
"learning_rate": 0.0,
|
| 39 |
+
"lr_schedule": lambda _: 0.0,
|
| 40 |
+
"clip_range": lambda _: 0.0,
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
checkpoint = load_from_hub(repo_id, filename)
|
| 44 |
+
model = PPO.load(checkpoint, custom_objects=custom_objects, print_system_info=True)
|
| 45 |
...
|
| 46 |
```
|