khatkeashish commited on
Commit
82f8384
1 Parent(s): 2189fa1

First Push

Browse files
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-Pyramids
9
+ library_name: ml-agents
10
+ ---
11
+
12
+ # **ppo** Agent playing **Pyramids**
13
+ This is a trained model of a **ppo** agent playing **Pyramids** 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-Pyramids
28
+ 2. Step 1: Write your model_id: khatkeashish/ppo-PyramidsRND
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": {"Pyramids": {"trainer_type": "ppo", "hyperparameters": {"batch_size": 128, "buffer_size": 2048, "learning_rate": 0.0003, "beta": 0.01, "epsilon": 0.2, "lambd": 0.95, "num_epoch": 3, "shared_critic": false, "learning_rate_schedule": "linear", "beta_schedule": "linear", "epsilon_schedule": "linear"}, "network_settings": {"normalize": false, "hidden_units": 512, "num_layers": 2, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}, "reward_signals": {"extrinsic": {"gamma": 0.99, "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}}, "rnd": {"gamma": 0.99, "strength": 0.01, "network_settings": {"normalize": false, "hidden_units": 64, "num_layers": 3, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}, "learning_rate": 0.0001, "encoding_size": null}}, "init_path": null, "keep_checkpoints": 5, "checkpoint_interval": 500000, "max_steps": 3000000, "time_horizon": 128, "summary_freq": 30000, "threaded": false, "self_play": null, "behavioral_cloning": null}}, "env_settings": {"env_path": "./training-envs-executables/linux/Pyramids/Pyramids", "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": "Pyramids Training", "initialize_from": null, "load_model": false, "resume": false, "force": true, "train_model": false, "inference": false, "results_dir": "results"}, "torch_settings": {"device": null}, "debug": false}
configuration.yaml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_settings: null
2
+ behaviors:
3
+ Pyramids:
4
+ trainer_type: ppo
5
+ hyperparameters:
6
+ batch_size: 128
7
+ buffer_size: 2048
8
+ learning_rate: 0.0003
9
+ beta: 0.01
10
+ epsilon: 0.2
11
+ lambd: 0.95
12
+ num_epoch: 3
13
+ shared_critic: false
14
+ learning_rate_schedule: linear
15
+ beta_schedule: linear
16
+ epsilon_schedule: linear
17
+ network_settings:
18
+ normalize: false
19
+ hidden_units: 512
20
+ num_layers: 2
21
+ vis_encode_type: simple
22
+ memory: null
23
+ goal_conditioning_type: hyper
24
+ deterministic: false
25
+ reward_signals:
26
+ extrinsic:
27
+ gamma: 0.99
28
+ strength: 1.0
29
+ network_settings:
30
+ normalize: false
31
+ hidden_units: 128
32
+ num_layers: 2
33
+ vis_encode_type: simple
34
+ memory: null
35
+ goal_conditioning_type: hyper
36
+ deterministic: false
37
+ rnd:
38
+ gamma: 0.99
39
+ strength: 0.01
40
+ network_settings:
41
+ normalize: false
42
+ hidden_units: 64
43
+ num_layers: 3
44
+ vis_encode_type: simple
45
+ memory: null
46
+ goal_conditioning_type: hyper
47
+ deterministic: false
48
+ learning_rate: 0.0001
49
+ encoding_size: null
50
+ init_path: null
51
+ keep_checkpoints: 5
52
+ checkpoint_interval: 500000
53
+ max_steps: 3000000
54
+ time_horizon: 128
55
+ summary_freq: 30000
56
+ threaded: false
57
+ self_play: null
58
+ behavioral_cloning: null
59
+ env_settings:
60
+ env_path: ./training-envs-executables/linux/Pyramids/Pyramids
61
+ env_args: null
62
+ base_port: 5005
63
+ num_envs: 1
64
+ num_areas: 1
65
+ seed: -1
66
+ max_lifetime_restarts: 10
67
+ restarts_rate_limit_n: 1
68
+ restarts_rate_limit_period_s: 60
69
+ engine_settings:
70
+ width: 84
71
+ height: 84
72
+ quality_level: 5
73
+ time_scale: 20
74
+ target_frame_rate: -1
75
+ capture_frame_rate: 60
76
+ no_graphics: true
77
+ environment_parameters: null
78
+ checkpoint_settings:
79
+ run_id: Pyramids Training
80
+ initialize_from: null
81
+ load_model: false
82
+ resume: false
83
+ force: true
84
+ train_model: false
85
+ inference: false
86
+ results_dir: results
87
+ torch_settings:
88
+ device: null
89
+ 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": "1675613132",
6
+ "python_version": "3.10.4 (main, Feb 5 2023, 16:54:05) [GCC 12.2.0]",
7
+ "command_line_arguments": "/home/ash/ak/code/Courses/RL/hugging_face/venv/bin/mlagents-learn ./config/ppo/PyramidsRND.yaml --env=./training-envs-executables/linux/Pyramids/Pyramids --run-id=Pyramids Training --no-graphics --force",
8
+ "mlagents_version": "0.30.0",
9
+ "mlagents_envs_version": "0.30.0",
10
+ "communication_protocol_version": "1.5.0",
11
+ "pytorch_version": "1.11.0+cu102",
12
+ "numpy_version": "1.21.2",
13
+ "end_time_seconds": "1675613133"
14
+ },
15
+ "total": 0.05695925799955148,
16
+ "count": 1,
17
+ "self": 0.012765873994794674,
18
+ "children": {
19
+ "run_training.setup": {
20
+ "total": 0.02585164699848974,
21
+ "count": 1,
22
+ "self": 0.02585164699848974
23
+ },
24
+ "TrainerController.start_learning": {
25
+ "total": 0.018341737006267067,
26
+ "count": 1,
27
+ "self": 0.0005308450054144487,
28
+ "children": {
29
+ "TrainerController._reset_env": {
30
+ "total": 0.01778508399729617,
31
+ "count": 1,
32
+ "self": 0.01778508399729617
33
+ },
34
+ "trainer_threads": {
35
+ "total": 2.12400482269004e-06,
36
+ "count": 1,
37
+ "self": 2.12400482269004e-06
38
+ },
39
+ "TrainerController._save_models": {
40
+ "total": 2.3683998733758926e-05,
41
+ "count": 1,
42
+ "self": 2.3683998733758926e-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.30.0",
5
+ "torch_version": "1.11.0+cu102"
6
+ }
7
+ }