daveey commited on
Commit
535f508
1 Parent(s): c6df742

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ replay.mp4 filter=lfs diff=lfs merge=lfs -text
.summary/0/events.out.tfevents.1710999906.4346465a7ed9 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac8d690c590a42b7d11b5cf480942b35c87f918fe8c5cf0150eef6f77b412f39
3
+ size 40
.summary/0/events.out.tfevents.1710999960.4346465a7ed9 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d5511718d923bdc700d87b46a3ffad2c0fe061a1f61fe40d5c7d3769a91efd3
3
+ size 35635547
.summary/0/events.out.tfevents.1711040813.4346465a7ed9 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3547fd7d3c868268c9c547377a5ca904699025c3977ecdcf810e6588c6b52bb
3
+ size 1136323
.summary/0/events.out.tfevents.1711043187.4346465a7ed9 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67b7ec7caa20c2a616e2d9c5d7079b19c51d0edddfa2086e92a1f9276810e5ab
3
+ size 3067006
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sample-factory
3
+ tags:
4
+ - deep-reinforcement-learning
5
+ - reinforcement-learning
6
+ - sample-factory
7
+ ---
8
+
9
+ A(n) **APPO** model trained on the **GDY-PowerGrid** environment.
10
+
11
+ This model was trained using Sample-Factory 2.0: https://github.com/alex-petrenko/sample-factory.
12
+ Documentation for how to use Sample-Factory can be found at https://www.samplefactory.dev/
13
+
14
+
15
+ ## Downloading the model
16
+
17
+ After installing Sample-Factory, download the model with:
18
+ ```
19
+ python -m sample_factory.huggingface.load_from_hub -r daveey/metta
20
+ ```
21
+
22
+
23
+ ## Using the model
24
+
25
+ To run the model after download, use the `enjoy` script corresponding to this environment:
26
+ ```
27
+ python -m <path.to.enjoy.module> --algo=APPO --env=GDY-PowerGrid --train_dir=./train_dir --experiment=metta
28
+ ```
29
+
30
+
31
+ You can also upload models to the Hugging Face Hub using the same script with the `--push_to_hub` flag.
32
+ See https://www.samplefactory.dev/10-huggingface/huggingface/ for more details
33
+
34
+ ## Training with this model
35
+
36
+ To continue training with this model, use the `train` script corresponding to this environment:
37
+ ```
38
+ python -m <path.to.train.module> --algo=APPO --env=GDY-PowerGrid --train_dir=./train_dir --experiment=metta --restart_behavior=resume --train_for_env_steps=10000000000
39
+ ```
40
+
41
+ Note, you may have to adjust `--train_for_env_steps` to a suitably high number as the experiment will resume at the number of steps it concluded at.
42
+
checkpoint_p0/best_000043592_1428422656_reward_1.939.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7baf6f06a38c1c2b20505833750d6306c0ae317135d76eb2fee252d336b7a573
3
+ size 79628218
checkpoint_p0/checkpoint_000059740_1957560320.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f83d9c3d8461b622fae55bdf26160ece4af6ea5df61933aebfb596586c5ee90
3
+ size 79629212
checkpoint_p0/checkpoint_000059893_1962573824.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb6bdccfb4e3a2f225e7d8bdaca3c747c59749990566003cb19f488dba8e8303
3
+ size 79629212
config.json ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "help": false,
3
+ "algo": "APPO",
4
+ "env": "GDY-PowerGrid",
5
+ "experiment": "p2.objt_atn.4",
6
+ "train_dir": "/workspace/metta/train_dir",
7
+ "restart_behavior": "resume",
8
+ "device": "gpu",
9
+ "seed": null,
10
+ "num_policies": 1,
11
+ "async_rl": true,
12
+ "serial_mode": false,
13
+ "batched_sampling": false,
14
+ "num_batches_to_accumulate": 2,
15
+ "worker_num_splits": 2,
16
+ "policy_workers_per_policy": 1,
17
+ "max_policy_lag": 20000,
18
+ "num_workers": 50,
19
+ "num_envs_per_worker": 2,
20
+ "batch_size": 32768,
21
+ "num_batches_per_epoch": 1,
22
+ "num_epochs": 1,
23
+ "rollout": 256,
24
+ "recurrence": 256,
25
+ "shuffle_minibatches": false,
26
+ "gamma": 0.99,
27
+ "reward_scale": 1.0,
28
+ "reward_clip": 1000.0,
29
+ "value_bootstrap": false,
30
+ "normalize_returns": true,
31
+ "exploration_loss_coeff": 0.002,
32
+ "value_loss_coeff": 0.976,
33
+ "kl_loss_coeff": 0.0,
34
+ "aux_loss_coeff": 0.0,
35
+ "exploration_loss": "symmetric_kl",
36
+ "gae_lambda": 0.95,
37
+ "ppo_clip_ratio": 0.1,
38
+ "ppo_clip_value": 1.0,
39
+ "with_vtrace": false,
40
+ "vtrace_rho": 1.0,
41
+ "vtrace_c": 1.0,
42
+ "optimizer": "adam",
43
+ "adam_eps": 1e-06,
44
+ "adam_beta1": 0.9,
45
+ "adam_beta2": 0.999,
46
+ "max_grad_norm": 4.0,
47
+ "learning_rate": 0.0001,
48
+ "lr_schedule": "constant",
49
+ "lr_schedule_kl_threshold": 0.008,
50
+ "lr_adaptive_min": 1e-06,
51
+ "lr_adaptive_max": 0.01,
52
+ "obs_subtract_mean": 0.0,
53
+ "obs_scale": 1.0,
54
+ "normalize_input": true,
55
+ "normalize_input_keys": null,
56
+ "decorrelate_experience_max_seconds": 150,
57
+ "decorrelate_envs_on_one_worker": true,
58
+ "actor_worker_gpus": [],
59
+ "set_workers_cpu_affinity": true,
60
+ "force_envs_single_thread": false,
61
+ "default_niceness": 0,
62
+ "log_to_file": true,
63
+ "experiment_summaries_interval": 10,
64
+ "flush_summaries_interval": 30,
65
+ "stats_avg": 100,
66
+ "summaries_use_frameskip": true,
67
+ "heartbeat_interval": 20,
68
+ "heartbeat_reporting_interval": 180,
69
+ "train_for_env_steps": 10000000000,
70
+ "train_for_seconds": 10000000000,
71
+ "save_every_sec": 120,
72
+ "keep_checkpoints": 2,
73
+ "load_checkpoint_path": null,
74
+ "init_checkpoint_path": "train_dir/p2.objt_atn.3/checkpoint_p0/checkpoint_000046241_1515225088.pth",
75
+ "load_checkpoint_kind": "latest",
76
+ "save_milestones_sec": -1,
77
+ "save_best_every_sec": 5,
78
+ "save_best_metric": "reward",
79
+ "save_best_after": 100000,
80
+ "benchmark": false,
81
+ "encoder_mlp_layers": [
82
+ 512,
83
+ 512
84
+ ],
85
+ "encoder_conv_architecture": "convnet_simple",
86
+ "encoder_conv_mlp_layers": [
87
+ 512
88
+ ],
89
+ "use_rnn": true,
90
+ "rnn_size": 512,
91
+ "rnn_type": "gru",
92
+ "rnn_num_layers": 1,
93
+ "decoder_mlp_layers": [],
94
+ "nonlinearity": "elu",
95
+ "policy_initialization": "orthogonal",
96
+ "policy_init_gain": 1.0,
97
+ "actor_critic_share_weights": true,
98
+ "adaptive_stddev": true,
99
+ "continuous_tanh_scale": 0.0,
100
+ "initial_stddev": 1.0,
101
+ "use_env_info_cache": false,
102
+ "env_gpu_actions": false,
103
+ "env_gpu_observations": true,
104
+ "env_frameskip": 1,
105
+ "env_framestack": 1,
106
+ "pixel_format": "CHW",
107
+ "use_record_episode_statistics": false,
108
+ "episode_counter": false,
109
+ "with_wandb": true,
110
+ "wandb_user": null,
111
+ "wandb_project": "sample_factory",
112
+ "wandb_group": null,
113
+ "wandb_job_type": "SF",
114
+ "wandb_tags": [],
115
+ "with_pbt": false,
116
+ "pbt_mix_policies_in_one_env": true,
117
+ "pbt_period_env_steps": 5000000,
118
+ "pbt_start_mutation": 20000000,
119
+ "pbt_replace_fraction": 0.3,
120
+ "pbt_mutation_rate": 0.15,
121
+ "pbt_replace_reward_gap": 0.1,
122
+ "pbt_replace_reward_gap_absolute": 1e-06,
123
+ "pbt_optimize_gamma": false,
124
+ "pbt_target_objective": "true_objective",
125
+ "pbt_perturb_min": 1.1,
126
+ "pbt_perturb_max": 1.5,
127
+ "env_num_agents": 100,
128
+ "env_max_steps": 1000,
129
+ "scenario": null,
130
+ "agent": null,
131
+ "env_altar:cooldown": [
132
+ 2,
133
+ 5
134
+ ],
135
+ "env_altar:cost": [
136
+ 100.0
137
+ ],
138
+ "env_charger:cooldown": [
139
+ 2,
140
+ 2
141
+ ],
142
+ "env_charger:energy": [
143
+ 50,
144
+ 50
145
+ ],
146
+ "env_generator:cooldown": [
147
+ 20,
148
+ 100
149
+ ],
150
+ "env_agent:energy:regen": [
151
+ 0,
152
+ 0
153
+ ],
154
+ "env_agent:energy:initial": [
155
+ 10,
156
+ 200
157
+ ],
158
+ "env_agent:energy:max": [
159
+ 500,
160
+ 500
161
+ ],
162
+ "env_gift:energy": [
163
+ 20,
164
+ 20
165
+ ],
166
+ "env_cost:move:predator": [
167
+ 0,
168
+ 0
169
+ ],
170
+ "env_cost:move:prey": [
171
+ 0,
172
+ 0
173
+ ],
174
+ "env_cost:move": [
175
+ 0,
176
+ 0
177
+ ],
178
+ "env_cost:jump": [
179
+ 3,
180
+ 3
181
+ ],
182
+ "env_cost:rotate": [
183
+ 0,
184
+ 0
185
+ ],
186
+ "env_cost:shield": [
187
+ 0.0
188
+ ],
189
+ "env_cost:shield:upkeep": [
190
+ 1,
191
+ 2
192
+ ],
193
+ "env_cost:frozen": [
194
+ 0,
195
+ 0
196
+ ],
197
+ "env_cost:attack": [
198
+ 5,
199
+ 40
200
+ ],
201
+ "env_attack:damage": [
202
+ 5,
203
+ 40
204
+ ],
205
+ "env_attack:freeze_duration": [
206
+ 5,
207
+ 100
208
+ ],
209
+ "env_tile_size": [
210
+ 32,
211
+ 32
212
+ ],
213
+ "env_width": [
214
+ 100.0
215
+ ],
216
+ "env_height": [
217
+ 100.0
218
+ ],
219
+ "env_wall_density": [
220
+ 0.01
221
+ ],
222
+ "env_milestone_density": [
223
+ 0,
224
+ 0.1
225
+ ],
226
+ "env_num_altars": [
227
+ 20.0
228
+ ],
229
+ "env_num_chargers": [
230
+ 30.0
231
+ ],
232
+ "env_num_generators": [
233
+ 200.0
234
+ ],
235
+ "env_rsm_num_families": [
236
+ 0,
237
+ 0
238
+ ],
239
+ "env_rsm_family_reward": [
240
+ 0,
241
+ 0
242
+ ],
243
+ "env_reward_rank_steps": [
244
+ 1000.0
245
+ ],
246
+ "env_reward_prestige_weight": [
247
+ 0.0
248
+ ],
249
+ "agent_max_features": 50,
250
+ "agent_fc_layers": 4,
251
+ "agent_fc_size": 512,
252
+ "agent_embedding_size": 64,
253
+ "agent_embedding_layers": 3,
254
+ "agent_attention_size": 512,
255
+ "agent_attention_layers": 2,
256
+ "command_line": "--algo=APPO --env=GDY-PowerGrid --with_wandb=True --num_workers=25 --env_num_agents=5 --env_width=20:40 --env_height=20:40 --env_num_altars=1:5 --env_num_chargers=1:5 --env_num_generators=5:20 --env_wall_density=0:0.15 --env_reward_rank_steps=10 --agent_fc_layers=3 --agent_fc_size=512 --agent_embedding_size=64 --agent_embedding_layers=3 --agent_attention_size=512 --agent_attention_layers=2 --rnn_num_layers=2 --rnn_size=512 --rnn_type=gru --rollout=256 --batch_size=65536 --decorrelate_experience_max_seconds=150 --value_loss_coeff=0.976 --exploration_loss=symmetric_kl --exploration_loss_coeff=0.002 --policy_initialization=orthogonal --learning_rate=0.0001 --max_policy_lag=2000 --nonlinearity=elu --normalize_input=True --env_width=100 --env_height=100 --env_num_agents=100 --env_num_altars=20 --env_num_chargers=30 --env_num_generators=200 --env_wall_density=0.01 --env_reward_rank_steps=1000 --env_altar:cost=100 --env_reward_prestige_weight=0 --env_cost:shield=0 --agent_fc_layers=4 --agent_fc_size=512 --rnn_num_layers=1 --rnn_size=512 --rnn_type=gru --max_policy_lag=20000 --experiment=p2.objt_atn.4 --num_workers=50 --batch_size=32768 --init_checkpoint_path=workspace/metta/train_dir/p2.objt_atn.3/checkpoint_p0/checkpoint_000046241_1515225088.pth",
257
+ "cli_args": {
258
+ "algo": "APPO",
259
+ "env": "GDY-PowerGrid",
260
+ "experiment": "p2.objt_atn.4",
261
+ "max_policy_lag": 20000,
262
+ "num_workers": 50,
263
+ "batch_size": 32768,
264
+ "rollout": 256,
265
+ "exploration_loss_coeff": 0.002,
266
+ "value_loss_coeff": 0.976,
267
+ "exploration_loss": "symmetric_kl",
268
+ "learning_rate": 0.0001,
269
+ "normalize_input": true,
270
+ "decorrelate_experience_max_seconds": 150,
271
+ "init_checkpoint_path": "workspace/metta/train_dir/p2.objt_atn.3/checkpoint_p0/checkpoint_000046241_1515225088.pth",
272
+ "rnn_size": 512,
273
+ "rnn_type": "gru",
274
+ "rnn_num_layers": 1,
275
+ "nonlinearity": "elu",
276
+ "policy_initialization": "orthogonal",
277
+ "with_wandb": true,
278
+ "env_num_agents": 100,
279
+ "env_altar:cost": [
280
+ 100.0
281
+ ],
282
+ "env_cost:shield": [
283
+ 0.0
284
+ ],
285
+ "env_width": [
286
+ 100.0
287
+ ],
288
+ "env_height": [
289
+ 100.0
290
+ ],
291
+ "env_wall_density": [
292
+ 0.01
293
+ ],
294
+ "env_num_altars": [
295
+ 20.0
296
+ ],
297
+ "env_num_chargers": [
298
+ 30.0
299
+ ],
300
+ "env_num_generators": [
301
+ 200.0
302
+ ],
303
+ "env_reward_rank_steps": [
304
+ 1000.0
305
+ ],
306
+ "env_reward_prestige_weight": [
307
+ 0.0
308
+ ],
309
+ "agent_fc_layers": 4,
310
+ "agent_fc_size": 512,
311
+ "agent_embedding_size": 64,
312
+ "agent_embedding_layers": 3,
313
+ "agent_attention_size": 512,
314
+ "agent_attention_layers": 2
315
+ },
316
+ "git_hash": "960abca49c3c941d43bcf65df909840ad43c6156",
317
+ "git_repo_name": "https://github.com/daveey/metta.git",
318
+ "wandb_unique_id": "p2.objt_atn.4_20240320_224453_910734"
319
+ }
git.diff ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ diff --git a/third_party/griddly b/third_party/griddly
2
+ index caf0179..67717ea 160000
3
+ --- a/third_party/griddly
4
+ +++ b/third_party/griddly
5
+ @@ -1 +1 @@
6
+ -Subproject commit caf0179c470084f7c236eee5f4b1eee6634f2351
7
+ +Subproject commit 67717ea344e2ffda18e063e8a13a8709bf0ff3e3
replay.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd1990715c9f955fcf319fadf9ff98c8f8da6629ce8c4162e955accc80be0cb4
3
+ size 4210290
sf_log.txt ADDED
The diff for this file is too large to render. See raw diff