layoric commited on
Commit
60b68ef
1 Parent(s): 1761025
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - unity-ml-agents
5
+ - ml-agents
6
+ - deep-reinforcement-learning
7
+ - reinforcement-learning
8
+ - ML-Agents-Huggy
9
+ library_name: ml-agents
10
+ ---
11
+
12
+ # **ppo** Agent playing **Huggy**
13
+ This is a trained model of a **ppo** agent playing **Huggy** using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents).
14
+
15
+ ## Usage (with ML-Agents)
16
+ The Documentation: https://github.com/huggingface/ml-agents#get-started
17
+ We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub:
18
+
19
+
20
+ ### Resume the training
21
+ ```
22
+ mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume
23
+ ```
24
+ ### Watch your Agent play
25
+ You can watch your agent **playing directly in your browser:**.
26
+
27
+ 1. Go to https://huggingface.co/spaces/unity/ML-Agents-Huggy
28
+ 2. Step 1: Write your model_id: layoric/ppo-Huggy
29
+ 3. Step 2: Select your *.nn /*.onnx file
30
+ 4. Click on Watch the agent play 👀
31
+
config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default_settings": null, "behaviors": {"Huggy": {"trainer_type": "ppo", "hyperparameters": {"batch_size": 2048, "buffer_size": 20480, "learning_rate": 0.0003, "beta": 0.005, "epsilon": 0.2, "lambd": 0.95, "num_epoch": 3, "learning_rate_schedule": "linear", "beta_schedule": "linear", "epsilon_schedule": "linear"}, "network_settings": {"normalize": true, "hidden_units": 512, "num_layers": 3, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}, "reward_signals": {"extrinsic": {"gamma": 0.995, "strength": 1.0, "network_settings": {"normalize": false, "hidden_units": 128, "num_layers": 2, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}}}, "init_path": null, "keep_checkpoints": 15, "checkpoint_interval": 200000, "max_steps": 2000000, "time_horizon": 1000, "summary_freq": 50000, "threaded": false, "self_play": null, "behavioral_cloning": null}}, "env_settings": {"env_path": "./trained-envs-executables/linux/Huggy/Huggy", "env_args": null, "base_port": 5005, "num_envs": 1, "num_areas": 1, "seed": -1, "max_lifetime_restarts": 10, "restarts_rate_limit_n": 1, "restarts_rate_limit_period_s": 60}, "engine_settings": {"width": 84, "height": 84, "quality_level": 5, "time_scale": 20, "target_frame_rate": -1, "capture_frame_rate": 60, "no_graphics": true}, "environment_parameters": null, "checkpoint_settings": {"run_id": "Huggy", "initialize_from": null, "load_model": false, "resume": false, "force": false, "train_model": false, "inference": false, "results_dir": "results"}, "torch_settings": {"device": null}, "debug": false}
configuration.yaml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_settings: null
2
+ behaviors:
3
+ Huggy:
4
+ trainer_type: ppo
5
+ hyperparameters:
6
+ batch_size: 2048
7
+ buffer_size: 20480
8
+ learning_rate: 0.0003
9
+ beta: 0.005
10
+ epsilon: 0.2
11
+ lambd: 0.95
12
+ num_epoch: 3
13
+ learning_rate_schedule: linear
14
+ beta_schedule: linear
15
+ epsilon_schedule: linear
16
+ network_settings:
17
+ normalize: true
18
+ hidden_units: 512
19
+ num_layers: 3
20
+ vis_encode_type: simple
21
+ memory: null
22
+ goal_conditioning_type: hyper
23
+ deterministic: false
24
+ reward_signals:
25
+ extrinsic:
26
+ gamma: 0.995
27
+ strength: 1.0
28
+ network_settings:
29
+ normalize: false
30
+ hidden_units: 128
31
+ num_layers: 2
32
+ vis_encode_type: simple
33
+ memory: null
34
+ goal_conditioning_type: hyper
35
+ deterministic: false
36
+ init_path: null
37
+ keep_checkpoints: 15
38
+ checkpoint_interval: 200000
39
+ max_steps: 2000000
40
+ time_horizon: 1000
41
+ summary_freq: 50000
42
+ threaded: false
43
+ self_play: null
44
+ behavioral_cloning: null
45
+ env_settings:
46
+ env_path: ./trained-envs-executables/linux/Huggy/Huggy
47
+ env_args: null
48
+ base_port: 5005
49
+ num_envs: 1
50
+ num_areas: 1
51
+ seed: -1
52
+ max_lifetime_restarts: 10
53
+ restarts_rate_limit_n: 1
54
+ restarts_rate_limit_period_s: 60
55
+ engine_settings:
56
+ width: 84
57
+ height: 84
58
+ quality_level: 5
59
+ time_scale: 20
60
+ target_frame_rate: -1
61
+ capture_frame_rate: 60
62
+ no_graphics: true
63
+ environment_parameters: null
64
+ checkpoint_settings:
65
+ run_id: Huggy
66
+ initialize_from: null
67
+ load_model: false
68
+ resume: false
69
+ force: false
70
+ train_model: false
71
+ inference: false
72
+ results_dir: results
73
+ torch_settings:
74
+ device: null
75
+ debug: false
run_logs/timers.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "root",
3
+ "metadata": {
4
+ "timer_format_version": "0.1.0",
5
+ "start_time_seconds": "1675826660",
6
+ "python_version": "3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]",
7
+ "command_line_arguments": "/usr/local/bin/mlagents-learn ./config/ppo/Huggy.yaml --env=./trained-envs-executables/linux/Huggy/Huggy --run-id=Huggy --no-graphics",
8
+ "mlagents_version": "0.29.0.dev0",
9
+ "mlagents_envs_version": "0.29.0.dev0",
10
+ "communication_protocol_version": "1.5.0",
11
+ "pytorch_version": "1.8.1+cu102",
12
+ "numpy_version": "1.21.6",
13
+ "end_time_seconds": "1675826660"
14
+ },
15
+ "total": 0.18768487599999162,
16
+ "count": 1,
17
+ "self": 0.01426516300006142,
18
+ "children": {
19
+ "run_training.setup": {
20
+ "total": 0.1260321919999683,
21
+ "count": 1,
22
+ "self": 0.1260321919999683
23
+ },
24
+ "TrainerController.start_learning": {
25
+ "total": 0.04738752099996191,
26
+ "count": 1,
27
+ "self": 0.0006166009998764821,
28
+ "children": {
29
+ "TrainerController._reset_env": {
30
+ "total": 0.04675709600002165,
31
+ "count": 1,
32
+ "self": 0.04675709600002165
33
+ },
34
+ "trainer_threads": {
35
+ "total": 1.2490000358411635e-06,
36
+ "count": 1,
37
+ "self": 1.2490000358411635e-06
38
+ },
39
+ "TrainerController._save_models": {
40
+ "total": 1.2575000027936767e-05,
41
+ "count": 1,
42
+ "self": 1.2575000027936767e-05
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
run_logs/training_status.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "stats_format_version": "0.3.0",
4
+ "mlagents_version": "0.29.0.dev0",
5
+ "torch_version": "1.8.1+cu102"
6
+ }
7
+ }