daveey commited on
Commit
2ff4580
1 Parent(s): dddf8af

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ 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
+ env_a100_100x100.mp4 filter=lfs diff=lfs merge=lfs -text
37
+ env_a20_40x40.mp4 filter=lfs diff=lfs merge=lfs -text
38
+ env_a5_25x25.mp4 filter=lfs diff=lfs merge=lfs -text
.summary/0/events.out.tfevents.1711738851.ip-172-31-37-173.ec2.internal ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17b2c436da32752187fe6891765864e61624730cc1abb8329640186b37744380
3
+ size 3837593
.summary/0/events.out.tfevents.1711742223.ip-172-31-79-185.ec2.internal ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:622cb2f3fe692d1e681398f4a21706e111b93e42a293243c0609c1d7b2aba9b5
3
+ size 12132412
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 metta-ai/baseline.v0.0.3
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=baseline.v0.0.3
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=baseline.v0.0.3 --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_000034523_565624832_reward_0.655.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:130967a109d0b90992c36785f87c8ae209f69f089993a25fd6f31034ccd7ea05
3
+ size 76478202
checkpoint_p0/checkpoint_000040205_658718720.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f94b25afafd91be3f52a2e404a99f28e2c0a18683961f8f13f12f1c15272adaa
3
+ size 76479020
checkpoint_p0/checkpoint_000040513_663764992.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14c3a1ed44dbcd7cb5506562f51f5cb5a36fe62683f79c26c410932898fe1b30
3
+ size 76479020
config.json ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "help": false,
3
+ "algo": "APPO",
4
+ "env": "GDY-PowerGrid",
5
+ "experiment": "b.a20.20x20_40x40.norm",
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": 50,
18
+ "num_workers": 64,
19
+ "num_envs_per_worker": 2,
20
+ "batch_size": 16384,
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": null,
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": "platypus",
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_altar:cooldown": [
128
+ 2,
129
+ 5
130
+ ],
131
+ "env_altar:cost": [
132
+ 100.0
133
+ ],
134
+ "env_charger:cooldown": [
135
+ 2,
136
+ 2
137
+ ],
138
+ "env_charger:energy": [
139
+ 50,
140
+ 50
141
+ ],
142
+ "env_generator:cooldown": [
143
+ 20,
144
+ 100
145
+ ],
146
+ "env_agent:energy:regen": [
147
+ 0,
148
+ 0
149
+ ],
150
+ "env_agent:energy:initial": [
151
+ 10,
152
+ 200
153
+ ],
154
+ "env_agent:energy:max": [
155
+ 500,
156
+ 500
157
+ ],
158
+ "env_gift:energy": [
159
+ 20,
160
+ 20
161
+ ],
162
+ "env_cost:move:predator": [
163
+ 0,
164
+ 0
165
+ ],
166
+ "env_cost:move:prey": [
167
+ 0,
168
+ 0
169
+ ],
170
+ "env_cost:move": [
171
+ 0,
172
+ 0
173
+ ],
174
+ "env_cost:jump": [
175
+ 3,
176
+ 3
177
+ ],
178
+ "env_cost:rotate": [
179
+ 0,
180
+ 0
181
+ ],
182
+ "env_cost:shield": [
183
+ 0.0
184
+ ],
185
+ "env_cost:shield:upkeep": [
186
+ 1,
187
+ 2
188
+ ],
189
+ "env_cost:frozen": [
190
+ 0,
191
+ 0
192
+ ],
193
+ "env_cost:attack": [
194
+ 5,
195
+ 40
196
+ ],
197
+ "env_attack:damage": [
198
+ 5,
199
+ 40
200
+ ],
201
+ "env_attack:freeze_duration": [
202
+ 5,
203
+ 100
204
+ ],
205
+ "env_num_agents": [
206
+ 20.0
207
+ ],
208
+ "env_tile_size": [
209
+ 32,
210
+ 32
211
+ ],
212
+ "env_width": [
213
+ 20.0,
214
+ 40.0
215
+ ],
216
+ "env_height": [
217
+ 20.0,
218
+ 40.0
219
+ ],
220
+ "env_max_steps": [
221
+ 1000,
222
+ 1000
223
+ ],
224
+ "env_wall_density": [
225
+ 0.01
226
+ ],
227
+ "env_milestone_density": [
228
+ 0,
229
+ 0.1
230
+ ],
231
+ "env_num_altars": [
232
+ 5.0
233
+ ],
234
+ "env_num_chargers": [
235
+ 10.0
236
+ ],
237
+ "env_num_generators": [
238
+ 50.0
239
+ ],
240
+ "env_rsm_num_families": [
241
+ 0,
242
+ 0
243
+ ],
244
+ "env_rsm_family_reward": [
245
+ 0,
246
+ 0
247
+ ],
248
+ "env_reward_rank_steps": [
249
+ 1000,
250
+ 1000
251
+ ],
252
+ "env_reward_prestige_weight": [
253
+ 0,
254
+ 0
255
+ ],
256
+ "agent_max_features": 50,
257
+ "agent_fc_layers": 3,
258
+ "agent_fc_size": 512,
259
+ "agent_embedding_size": 64,
260
+ "agent_embedding_layers": 3,
261
+ "command_line": "--env_wall_density=0.01 --env_altar:cost=100 --env_cost:shield=0 --env_num_agents=20 --env_width=20:40 --env_height=20:40 --env_num_altars=5 --env_num_chargers=10 --env_num_generators=50 --normalize_input=True --aux_loss_coef=0 --recurrence=256 --rollout=256 --value_loss_coeff=0.976 --exploration_loss=symmetric_kl --exploration_loss_coeff=0.002 --policy_initialization=orthogonal --learning_rate=0.0001 --max_policy_lag=50 --nonlinearity=elu --load_checkpoint_kind=latest --rnn_num_layers=1 --rnn_size=512 --rnn_type=gru --agent_fc_layers=3 --agent_fc_size=512 --agent_embedding_size=64 --agent_embedding_layers=3 --with_wandb=True --wandb_user=platypus --wandb_project=sample_factory --batch_size=16384 --decorrelate_experience_max_seconds=150 --experiment=b.a20.20x20_40x40.norm --env=GDY-PowerGrid",
262
+ "cli_args": {
263
+ "env": "GDY-PowerGrid",
264
+ "experiment": "b.a20.20x20_40x40.norm",
265
+ "max_policy_lag": 50,
266
+ "batch_size": 16384,
267
+ "rollout": 256,
268
+ "recurrence": 256,
269
+ "exploration_loss_coeff": 0.002,
270
+ "value_loss_coeff": 0.976,
271
+ "aux_loss_coeff": 0.0,
272
+ "exploration_loss": "symmetric_kl",
273
+ "learning_rate": 0.0001,
274
+ "normalize_input": true,
275
+ "decorrelate_experience_max_seconds": 150,
276
+ "load_checkpoint_kind": "latest",
277
+ "rnn_size": 512,
278
+ "rnn_type": "gru",
279
+ "rnn_num_layers": 1,
280
+ "nonlinearity": "elu",
281
+ "policy_initialization": "orthogonal",
282
+ "with_wandb": true,
283
+ "wandb_user": "platypus",
284
+ "wandb_project": "sample_factory",
285
+ "env_altar:cost": [
286
+ 100.0
287
+ ],
288
+ "env_cost:shield": [
289
+ 0.0
290
+ ],
291
+ "env_num_agents": [
292
+ 20.0
293
+ ],
294
+ "env_width": [
295
+ 20.0,
296
+ 40.0
297
+ ],
298
+ "env_height": [
299
+ 20.0,
300
+ 40.0
301
+ ],
302
+ "env_wall_density": [
303
+ 0.01
304
+ ],
305
+ "env_num_altars": [
306
+ 5.0
307
+ ],
308
+ "env_num_chargers": [
309
+ 10.0
310
+ ],
311
+ "env_num_generators": [
312
+ 50.0
313
+ ],
314
+ "agent_fc_layers": 3,
315
+ "agent_fc_size": 512,
316
+ "agent_embedding_size": 64,
317
+ "agent_embedding_layers": 3
318
+ },
319
+ "git_hash": "a9d0c93c1854a34c7dd674bf327bc59b9831e10a",
320
+ "git_repo_name": "https://github.com/daveey/metta.git",
321
+ "wandb_unique_id": "b.a20.20x20_40x40.norm_20240329_120046_450296"
322
+ }
env_a100_100x100.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7467609f18ba03fdf28e28d4b77fcce5c6bb15cd0ef13a7f2436c9fc646cde5d
3
+ size 12425790
env_a20_40x40.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d6ac88750b89110511d737c7040357fff3569f5100ec39dc3ea9e74bfadc211
3
+ size 6493147
env_a5_25x25.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97b126c88688ac6cd1fecf73e5951ddcca4793f12e02c801c55e407a58e65c6d
3
+ size 2584700
git.diff ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ diff --git a/third_party/sample_factory b/third_party/sample_factory
2
+ index dfcb7ba..f7d3662 160000
3
+ --- a/third_party/sample_factory
4
+ +++ b/third_party/sample_factory
5
+ @@ -1 +1 @@
6
+ -Subproject commit dfcb7ba7274f4867f6d3238d7ea0ec84ddb5c28f
7
+ +Subproject commit f7d36626407b6e061fec0677a1e85931c17cdaef
sf_log.txt ADDED
The diff for this file is too large to render. See raw diff