elliemci commited on
Commit
283ae5a
·
verified ·
1 Parent(s): 9f60e47

Model card: results with sources, training config, links

Browse files
Files changed (1) hide show
  1. README.md +54 -21
README.md CHANGED
@@ -5,31 +5,64 @@ tags:
5
  - deep-reinforcement-learning
6
  - reinforcement-learning
7
  - ML-Agents-SnowballTarget
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
- # **ppo** Agent playing **SnowballTarget**
11
- This is a trained model of a **ppo** agent playing **SnowballTarget**
12
- using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents).
13
 
14
- ## Usage (with ML-Agents)
15
- The Documentation: https://unity-technologies.github.io/ml-agents/ML-Agents-Toolkit-Documentation/
16
 
17
- We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub:
18
- - A *short tutorial* where you teach Huggy the Dog 🐶 to fetch the stick and then play with him directly in your
19
- browser: https://huggingface.co/learn/deep-rl-course/unitbonus1/introduction
20
- - A *longer tutorial* to understand how works ML-Agents:
21
- https://huggingface.co/learn/deep-rl-course/unit5/introduction
22
 
23
- ### Resume the training
24
- ```bash
25
- mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume
26
- ```
27
 
28
- ### Watch your Agent play
29
- You can watch your agent **playing directly in your browser**
30
 
31
- 1. If the environment is part of ML-Agents official environments, go to https://huggingface.co/unity
32
- 2. Step 1: Find your model_id: elliemci/ppo-Snowball-Target
33
- 3. Step 2: Select your *.nn /*.onnx file
34
- 4. Click on Watch the agent play 👀
35
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  - deep-reinforcement-learning
6
  - reinforcement-learning
7
  - ML-Agents-SnowballTarget
8
+ model-index:
9
+ - name: PPO
10
+ results:
11
+ - task:
12
+ type: reinforcement-learning
13
+ name: reinforcement-learning
14
+ dataset:
15
+ name: SnowballTarget
16
+ type: SnowballTarget
17
+ metrics:
18
+ - type: mean_reward
19
+ value: 28.82
20
+ name: training mean reward at 3,999,976 steps
21
+ verified: false
22
  ---
23
 
24
+ # **PPO** agent playing **SnowballTarget**
 
 
25
 
26
+ ![SnowballTarget: course illustration, not my agent](https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit7/snowballtarget.gif)
 
27
 
28
+ *Course illustration, not my agent (image from the Hugging Face Deep RL Course).*
 
 
 
 
29
 
30
+ A [PPO](https://arxiv.org/abs/1707.06347) agent trained with the
31
+ [Unity ML-Agents](https://github.com/Unity-Technologies/ml-agents) toolkit on **SnowballTarget**, where the agent throws snowballs at
32
+ targets, as a [Unit 5](https://huggingface.co/learn/deep-rl-course/unit5/introduction) project of the Hugging Face Deep RL Course.
 
33
 
34
+ ## Results
 
35
 
36
+ | | |
37
+ |---|---|
38
+ | Steps trained | 4,059,440 (the run stopped at 4.06M of `max_steps` 5M) |
39
+ | Mean reward at the final checkpoint | not recorded (`reward: null`) |
40
+ | Last recorded mean reward, at 3,999,976 steps | **28.82** |
41
+
42
+ Source: `run_logs/training_status.json`; `max_steps` from `configuration.yaml`. The reward is a training-time mean from the
43
+ stochastic policy, **not** a separate evaluation, and it belongs to an earlier checkpoint than the final model.
44
+ The run was resumed several times (7 TensorBoard event files in `SnowballTarget/`).
45
+
46
+ ## Training
47
+
48
+ * Trainer `ppo`, behaviour `SnowballTarget`, run id `SnowballTarget1`, 1 environment. ML-Agents 1.2.0.dev0, PyTorch 2.2.2 (`run_logs/training_status.json` metadata).
49
+ * Hyperparameters: batch 128, buffer 2048, learning rate 1e-3 (linear), beta 5e-3, epsilon 0.2, lambda 0.95, 3 epochs,
50
+ network 2 x 256, gamma 0.99, time horizon 64.
51
+ * Full config: `configuration.yaml` in this repo. Notebook and notes:
52
+ [GitHub](https://github.com/elliemci/deep-rl/tree/main/units/unit5-ml-agents).
53
+
54
+ ## Watch the agent play
55
+
56
+ The Hugging Face browser demo for this environment currently hangs on model search, so no replay is available.
57
+
58
+ ## Download
59
+
60
+ ```bash
61
+ mlagents-load-from-hf --repo-id="elliemci/ppo-Snowball-Target" --local-dir="./downloads"
62
+ ```
63
+
64
+ ## Resume training
65
+
66
+ ```bash
67
+ mlagents-learn <your_configuration_file_path.yaml> --run-id=SnowballTarget1 --resume
68
+ ```