ACT a21-floor-basket-transfer b512: hb_baselines bai 2c91a514, batch 512, 4000 steps, seed 0 (seeded aug), all 100 episodes of a21-floor-transfer-basket-trim-raw-head-expert-v1 @682f2bfc, ego_view + chest; trained on 1 x A800; in-loop nMSE 0.0288
Browse files- a21-floor-basket-transfer/b512/step-002000/SHA256SUMS +3 -0
- a21-floor-basket-transfer/b512/step-002000/config.json +910 -0
- a21-floor-basket-transfer/b512/step-002000/model.pt +3 -0
- a21-floor-basket-transfer/b512/step-002000/protocol.json +96 -0
- a21-floor-basket-transfer/b512/step-004000/SHA256SUMS +25 -0
- a21-floor-basket-transfer/b512/step-004000/config.json +910 -0
- a21-floor-basket-transfer/b512/step-004000/model.pt +3 -0
- a21-floor-basket-transfer/b512/step-004000/protocol.json +184 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/augmentation/hb_aug_v2.py +163 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/__init__.py +12 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/act_nets.py +615 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/adapters.py +58 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/check_flash_adapter.py +114 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/check_flash_parity.py +141 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/data.py +403 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/flash.py +412 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/inloop.py +117 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/nets.py +212 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/ode_nets.py +181 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/policies.py +454 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/requirements.txt +12 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/runtime.py +168 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/train.py +552 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/policy/ACT/model.py +12 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/code_commit.txt +1 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/inloop-mse.jsonl +16 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/pip_freeze_hb-baselines.txt +58 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/run.json +934 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/train.log +114 -0
- a21-floor-basket-transfer/b512/step-004000/training_records/train_log.jsonl +82 -0
a21-floor-basket-transfer/b512/step-002000/SHA256SUMS
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
73d500b9431ecc8d794d14d81d6dc6c3b754f2d362ba64cbeb5266368063e351 config.json
|
| 2 |
+
81170ea6dce1ef99740354b8e4aba4981726c4c983d7db9f219d81eb2334a944 model.pt
|
| 3 |
+
efb5122257677b1054d5613dcd688458e03b9d341bb2a5c18b3c3947cbe48b25 protocol.json
|
a21-floor-basket-transfer/b512/step-002000/config.json
ADDED
|
@@ -0,0 +1,910 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"policy": {
|
| 3 |
+
"policy": "act",
|
| 4 |
+
"n_cameras": 2,
|
| 5 |
+
"state_dim": 44,
|
| 6 |
+
"action_dim": 76,
|
| 7 |
+
"horizon": 16,
|
| 8 |
+
"backbone": "resnet18",
|
| 9 |
+
"backbone_weights": "IMAGENET1K_V1",
|
| 10 |
+
"backbone_norm": "frozen_bn",
|
| 11 |
+
"hidden_dim": 384,
|
| 12 |
+
"num_layers": 4,
|
| 13 |
+
"num_heads": 8,
|
| 14 |
+
"mlp_ratio": 4.0,
|
| 15 |
+
"dropout": 0.1,
|
| 16 |
+
"time_embed_dim": 128,
|
| 17 |
+
"num_inference_steps": null,
|
| 18 |
+
"num_train_timesteps": 100,
|
| 19 |
+
"beta_schedule": "squaredcos_cap_v2",
|
| 20 |
+
"prediction_type": "epsilon",
|
| 21 |
+
"clip_sample": true,
|
| 22 |
+
"act_hidden_dim": 512,
|
| 23 |
+
"dim_feedforward": 3200,
|
| 24 |
+
"enc_layers": 4,
|
| 25 |
+
"dec_layers": 7,
|
| 26 |
+
"nheads": 8,
|
| 27 |
+
"latent_dim": 32,
|
| 28 |
+
"kl_weight": 10.0,
|
| 29 |
+
"ode_body_dim": null,
|
| 30 |
+
"ode_width": 512,
|
| 31 |
+
"ode_layers": 4,
|
| 32 |
+
"ode_cond_dim": 512,
|
| 33 |
+
"ode_field_scale": 1.0,
|
| 34 |
+
"ode_dit_hidden": 512,
|
| 35 |
+
"ode_dit_layers": 4,
|
| 36 |
+
"ode_dit_heads": 8,
|
| 37 |
+
"ode_dit_tokens": 4,
|
| 38 |
+
"extra": {}
|
| 39 |
+
},
|
| 40 |
+
"contract": {
|
| 41 |
+
"name": "g1_sonic_dfx6",
|
| 42 |
+
"robot": "g1",
|
| 43 |
+
"cameras": [
|
| 44 |
+
"ego_view",
|
| 45 |
+
"chest"
|
| 46 |
+
],
|
| 47 |
+
"state": [
|
| 48 |
+
[
|
| 49 |
+
"observation.state",
|
| 50 |
+
0,
|
| 51 |
+
29
|
| 52 |
+
],
|
| 53 |
+
[
|
| 54 |
+
"observation.inspire_left_hand_state",
|
| 55 |
+
0,
|
| 56 |
+
6
|
| 57 |
+
],
|
| 58 |
+
[
|
| 59 |
+
"observation.inspire_right_hand_state",
|
| 60 |
+
0,
|
| 61 |
+
6
|
| 62 |
+
],
|
| 63 |
+
[
|
| 64 |
+
"observation.projected_gravity",
|
| 65 |
+
0,
|
| 66 |
+
3
|
| 67 |
+
]
|
| 68 |
+
],
|
| 69 |
+
"action": [
|
| 70 |
+
[
|
| 71 |
+
"action.motion_token",
|
| 72 |
+
0,
|
| 73 |
+
64
|
| 74 |
+
],
|
| 75 |
+
[
|
| 76 |
+
"observation.inspire_left_hand_state",
|
| 77 |
+
0,
|
| 78 |
+
6
|
| 79 |
+
],
|
| 80 |
+
[
|
| 81 |
+
"observation.inspire_right_hand_state",
|
| 82 |
+
0,
|
| 83 |
+
6
|
| 84 |
+
]
|
| 85 |
+
],
|
| 86 |
+
"state_dim": 44,
|
| 87 |
+
"action_dim": 76,
|
| 88 |
+
"action_space": "sonic_dfx6",
|
| 89 |
+
"body_dims": 29
|
| 90 |
+
},
|
| 91 |
+
"image_hw": [
|
| 92 |
+
168,
|
| 93 |
+
224
|
| 94 |
+
],
|
| 95 |
+
"task_text": "Grasp the basket handle with the right hand from the floor, stand up while retaining it, carry it to the long desk, then place and release it on the tabletop.",
|
| 96 |
+
"dataset": {
|
| 97 |
+
"name": "data",
|
| 98 |
+
"root": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a21-floor-transfer-basket-682f2bf/data",
|
| 99 |
+
"robot_type": null,
|
| 100 |
+
"fps": 30.0,
|
| 101 |
+
"episodes": [
|
| 102 |
+
0,
|
| 103 |
+
1,
|
| 104 |
+
2,
|
| 105 |
+
3,
|
| 106 |
+
4,
|
| 107 |
+
5,
|
| 108 |
+
6,
|
| 109 |
+
7,
|
| 110 |
+
8,
|
| 111 |
+
9,
|
| 112 |
+
10,
|
| 113 |
+
11,
|
| 114 |
+
12,
|
| 115 |
+
13,
|
| 116 |
+
14,
|
| 117 |
+
15,
|
| 118 |
+
16,
|
| 119 |
+
17,
|
| 120 |
+
18,
|
| 121 |
+
19,
|
| 122 |
+
20,
|
| 123 |
+
21,
|
| 124 |
+
22,
|
| 125 |
+
23,
|
| 126 |
+
24,
|
| 127 |
+
25,
|
| 128 |
+
26,
|
| 129 |
+
27,
|
| 130 |
+
28,
|
| 131 |
+
29,
|
| 132 |
+
30,
|
| 133 |
+
31,
|
| 134 |
+
32,
|
| 135 |
+
33,
|
| 136 |
+
34,
|
| 137 |
+
35,
|
| 138 |
+
36,
|
| 139 |
+
37,
|
| 140 |
+
38,
|
| 141 |
+
39,
|
| 142 |
+
40,
|
| 143 |
+
41,
|
| 144 |
+
42,
|
| 145 |
+
43,
|
| 146 |
+
44,
|
| 147 |
+
45,
|
| 148 |
+
46,
|
| 149 |
+
47,
|
| 150 |
+
48,
|
| 151 |
+
49,
|
| 152 |
+
50,
|
| 153 |
+
51,
|
| 154 |
+
52,
|
| 155 |
+
53,
|
| 156 |
+
54,
|
| 157 |
+
55,
|
| 158 |
+
56,
|
| 159 |
+
57,
|
| 160 |
+
58,
|
| 161 |
+
59,
|
| 162 |
+
60,
|
| 163 |
+
61,
|
| 164 |
+
62,
|
| 165 |
+
63,
|
| 166 |
+
64,
|
| 167 |
+
65,
|
| 168 |
+
66,
|
| 169 |
+
67,
|
| 170 |
+
68,
|
| 171 |
+
69,
|
| 172 |
+
70,
|
| 173 |
+
71,
|
| 174 |
+
72,
|
| 175 |
+
73,
|
| 176 |
+
74,
|
| 177 |
+
75,
|
| 178 |
+
76,
|
| 179 |
+
77,
|
| 180 |
+
78,
|
| 181 |
+
79,
|
| 182 |
+
80,
|
| 183 |
+
81,
|
| 184 |
+
82,
|
| 185 |
+
83,
|
| 186 |
+
84,
|
| 187 |
+
85,
|
| 188 |
+
86,
|
| 189 |
+
87,
|
| 190 |
+
88,
|
| 191 |
+
89,
|
| 192 |
+
90,
|
| 193 |
+
91,
|
| 194 |
+
92,
|
| 195 |
+
93,
|
| 196 |
+
94,
|
| 197 |
+
95,
|
| 198 |
+
96,
|
| 199 |
+
97,
|
| 200 |
+
98,
|
| 201 |
+
99
|
| 202 |
+
],
|
| 203 |
+
"train_episodes": [
|
| 204 |
+
0,
|
| 205 |
+
1,
|
| 206 |
+
2,
|
| 207 |
+
3,
|
| 208 |
+
4,
|
| 209 |
+
5,
|
| 210 |
+
6,
|
| 211 |
+
7,
|
| 212 |
+
8,
|
| 213 |
+
9,
|
| 214 |
+
10,
|
| 215 |
+
11,
|
| 216 |
+
12,
|
| 217 |
+
13,
|
| 218 |
+
14,
|
| 219 |
+
15,
|
| 220 |
+
16,
|
| 221 |
+
17,
|
| 222 |
+
18,
|
| 223 |
+
19,
|
| 224 |
+
20,
|
| 225 |
+
21,
|
| 226 |
+
22,
|
| 227 |
+
23,
|
| 228 |
+
24,
|
| 229 |
+
25,
|
| 230 |
+
26,
|
| 231 |
+
27,
|
| 232 |
+
28,
|
| 233 |
+
29,
|
| 234 |
+
30,
|
| 235 |
+
31,
|
| 236 |
+
32,
|
| 237 |
+
33,
|
| 238 |
+
34,
|
| 239 |
+
35,
|
| 240 |
+
36,
|
| 241 |
+
37,
|
| 242 |
+
38,
|
| 243 |
+
39,
|
| 244 |
+
40,
|
| 245 |
+
41,
|
| 246 |
+
42,
|
| 247 |
+
43,
|
| 248 |
+
44,
|
| 249 |
+
45,
|
| 250 |
+
46,
|
| 251 |
+
47,
|
| 252 |
+
48,
|
| 253 |
+
49,
|
| 254 |
+
50,
|
| 255 |
+
51,
|
| 256 |
+
52,
|
| 257 |
+
53,
|
| 258 |
+
54,
|
| 259 |
+
55,
|
| 260 |
+
56,
|
| 261 |
+
57,
|
| 262 |
+
58,
|
| 263 |
+
59,
|
| 264 |
+
60,
|
| 265 |
+
61,
|
| 266 |
+
62,
|
| 267 |
+
63,
|
| 268 |
+
64,
|
| 269 |
+
65,
|
| 270 |
+
66,
|
| 271 |
+
67,
|
| 272 |
+
68,
|
| 273 |
+
69,
|
| 274 |
+
70,
|
| 275 |
+
71,
|
| 276 |
+
72,
|
| 277 |
+
73,
|
| 278 |
+
74,
|
| 279 |
+
75,
|
| 280 |
+
76,
|
| 281 |
+
77,
|
| 282 |
+
78,
|
| 283 |
+
79,
|
| 284 |
+
80,
|
| 285 |
+
81,
|
| 286 |
+
82,
|
| 287 |
+
83,
|
| 288 |
+
84,
|
| 289 |
+
85,
|
| 290 |
+
86,
|
| 291 |
+
87,
|
| 292 |
+
88,
|
| 293 |
+
89,
|
| 294 |
+
90,
|
| 295 |
+
91,
|
| 296 |
+
92,
|
| 297 |
+
93,
|
| 298 |
+
94,
|
| 299 |
+
95,
|
| 300 |
+
96,
|
| 301 |
+
97,
|
| 302 |
+
98,
|
| 303 |
+
99
|
| 304 |
+
],
|
| 305 |
+
"val_episodes": [],
|
| 306 |
+
"train_frames": 86706,
|
| 307 |
+
"git_commit": null
|
| 308 |
+
},
|
| 309 |
+
"training": {
|
| 310 |
+
"steps": 4000,
|
| 311 |
+
"batch_size": 512,
|
| 312 |
+
"lr": 0.0001,
|
| 313 |
+
"betas": [
|
| 314 |
+
0.95,
|
| 315 |
+
0.999
|
| 316 |
+
],
|
| 317 |
+
"weight_decay": 1e-06,
|
| 318 |
+
"warmup": 200,
|
| 319 |
+
"schedule": "linear warm-up + cosine",
|
| 320 |
+
"backbone_lr_scale": 0.1,
|
| 321 |
+
"ema": 0.9999,
|
| 322 |
+
"shift_px": 0,
|
| 323 |
+
"amp": true,
|
| 324 |
+
"seed": 0,
|
| 325 |
+
"augmentation": {
|
| 326 |
+
"spec": "docs/augmentation_v2.md",
|
| 327 |
+
"version": "hb-aug-v2-20261109",
|
| 328 |
+
"implementation": "evaluation/augmentation/hb_aug_v2.py",
|
| 329 |
+
"visual": {
|
| 330 |
+
"effects": [
|
| 331 |
+
"exposure",
|
| 332 |
+
"contrast",
|
| 333 |
+
"saturation",
|
| 334 |
+
"hue",
|
| 335 |
+
"gamma",
|
| 336 |
+
"temperature",
|
| 337 |
+
"rotation_crop",
|
| 338 |
+
"noise",
|
| 339 |
+
"gaussian_blur",
|
| 340 |
+
"jpeg",
|
| 341 |
+
"motion_blur",
|
| 342 |
+
"sharpen",
|
| 343 |
+
"defocus",
|
| 344 |
+
"light_shadow",
|
| 345 |
+
"wb_channel"
|
| 346 |
+
],
|
| 347 |
+
"boosted_per_sample": 1,
|
| 348 |
+
"boost": 1.5,
|
| 349 |
+
"pixel_scale": "H / 224",
|
| 350 |
+
"future_targets": "none (one observation frame)"
|
| 351 |
+
},
|
| 352 |
+
"proprio": {
|
| 353 |
+
"robot": "g1",
|
| 354 |
+
"body_dims": 29,
|
| 355 |
+
"bias_deg": 2.0,
|
| 356 |
+
"bias_scope": "per_sample",
|
| 357 |
+
"noise_deg": 0.25,
|
| 358 |
+
"noise_clip_sigma": 3,
|
| 359 |
+
"delay_probability": 0.0,
|
| 360 |
+
"history_drop_probability": 0.0,
|
| 361 |
+
"velocity": false
|
| 362 |
+
},
|
| 363 |
+
"native_image_augmentation": "off",
|
| 364 |
+
"evaluation": "off"
|
| 365 |
+
},
|
| 366 |
+
"preflight": {
|
| 367 |
+
"samples": 64,
|
| 368 |
+
"state_dim": 44,
|
| 369 |
+
"body_dims": 29,
|
| 370 |
+
"images_changed": 64,
|
| 371 |
+
"body_values_moved": 1.0,
|
| 372 |
+
"max_body_offset_deg": 2.7234,
|
| 373 |
+
"actions_bit_identical": true,
|
| 374 |
+
"non_body_state_bit_identical": true,
|
| 375 |
+
"eval_items_deterministic": 8
|
| 376 |
+
},
|
| 377 |
+
"aug_seed": 0,
|
| 378 |
+
"layout": {
|
| 379 |
+
"nodes": 1,
|
| 380 |
+
"gpus": 1,
|
| 381 |
+
"per_gpu_batch": 512,
|
| 382 |
+
"global_batch": 512,
|
| 383 |
+
"gradient_accumulation": 1,
|
| 384 |
+
"num_workers": 32,
|
| 385 |
+
"prefetch": 2
|
| 386 |
+
},
|
| 387 |
+
"ema_schedule": "hb",
|
| 388 |
+
"inloop": {
|
| 389 |
+
"task": "a21",
|
| 390 |
+
"code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse",
|
| 391 |
+
"every": 250,
|
| 392 |
+
"exception": null
|
| 393 |
+
}
|
| 394 |
+
},
|
| 395 |
+
"stats": {
|
| 396 |
+
"state": {
|
| 397 |
+
"min": [
|
| 398 |
+
-2.2701830863952637,
|
| 399 |
+
-0.27317631244659424,
|
| 400 |
+
-0.29610729217529297,
|
| 401 |
+
0.10485819727182388,
|
| 402 |
+
-0.81209796667099,
|
| 403 |
+
-0.21175283193588257,
|
| 404 |
+
-2.262223958969116,
|
| 405 |
+
-0.46441030502319336,
|
| 406 |
+
-0.6099045872688293,
|
| 407 |
+
0.09954386949539185,
|
| 408 |
+
-0.7311134338378906,
|
| 409 |
+
-0.17378051578998566,
|
| 410 |
+
-0.1402929723262787,
|
| 411 |
+
-0.2614355683326721,
|
| 412 |
+
-0.046818941831588745,
|
| 413 |
+
-0.9373753666877747,
|
| 414 |
+
0.15214943885803223,
|
| 415 |
+
-1.0694174766540527,
|
| 416 |
+
0.18463465571403503,
|
| 417 |
+
-0.6166611313819885,
|
| 418 |
+
-0.4238741397857666,
|
| 419 |
+
-0.39084500074386597,
|
| 420 |
+
-1.7910548448562622,
|
| 421 |
+
-2.0524444580078125,
|
| 422 |
+
-0.4358607530593872,
|
| 423 |
+
-0.8722407817840576,
|
| 424 |
+
-1.8015098571777344,
|
| 425 |
+
-0.9958140850067139,
|
| 426 |
+
-0.7694652080535889,
|
| 427 |
+
0.9996309876441956,
|
| 428 |
+
0.9991293549537659,
|
| 429 |
+
0.9988874793052673,
|
| 430 |
+
0.9989415407180786,
|
| 431 |
+
0.9291336536407471,
|
| 432 |
+
0.9961293935775757,
|
| 433 |
+
0.3990069329738617,
|
| 434 |
+
0.3997034728527069,
|
| 435 |
+
0.39968419075012207,
|
| 436 |
+
0.40040892362594604,
|
| 437 |
+
0.5608876347541809,
|
| 438 |
+
0.0,
|
| 439 |
+
-0.1512877494096756,
|
| 440 |
+
-0.11685285717248917,
|
| 441 |
+
-1.0
|
| 442 |
+
],
|
| 443 |
+
"max": [
|
| 444 |
+
0.17076119780540466,
|
| 445 |
+
0.3236110508441925,
|
| 446 |
+
0.3831687271595001,
|
| 447 |
+
2.233388662338257,
|
| 448 |
+
0.19882787764072418,
|
| 449 |
+
0.17680993676185608,
|
| 450 |
+
0.1359129548072815,
|
| 451 |
+
0.10904774814844131,
|
| 452 |
+
0.27671802043914795,
|
| 453 |
+
2.1933090686798096,
|
| 454 |
+
0.1425849199295044,
|
| 455 |
+
0.21501344442367554,
|
| 456 |
+
0.22832152247428894,
|
| 457 |
+
0.2842406630516052,
|
| 458 |
+
0.5884646773338318,
|
| 459 |
+
0.3037309944629669,
|
| 460 |
+
0.7819540500640869,
|
| 461 |
+
0.04043177142739296,
|
| 462 |
+
1.388787031173706,
|
| 463 |
+
0.24945037066936493,
|
| 464 |
+
0.1306280493736267,
|
| 465 |
+
0.20737355947494507,
|
| 466 |
+
0.19802188873291016,
|
| 467 |
+
0.08976307511329651,
|
| 468 |
+
1.5246615409851074,
|
| 469 |
+
1.407419204711914,
|
| 470 |
+
0.8123467564582825,
|
| 471 |
+
1.1947879791259766,
|
| 472 |
+
1.6157052516937256,
|
| 473 |
+
1.0,
|
| 474 |
+
1.0,
|
| 475 |
+
1.0,
|
| 476 |
+
1.0,
|
| 477 |
+
1.0,
|
| 478 |
+
1.0,
|
| 479 |
+
1.0,
|
| 480 |
+
1.0,
|
| 481 |
+
1.0,
|
| 482 |
+
1.0,
|
| 483 |
+
1.0,
|
| 484 |
+
1.0,
|
| 485 |
+
0.639435887336731,
|
| 486 |
+
0.09351898729801178,
|
| 487 |
+
-0.7681906223297119
|
| 488 |
+
],
|
| 489 |
+
"mean": [
|
| 490 |
+
-0.7531668394892643,
|
| 491 |
+
0.08920568545369893,
|
| 492 |
+
0.07067044259490517,
|
| 493 |
+
0.7642513375470761,
|
| 494 |
+
-0.1636458593013806,
|
| 495 |
+
-0.023583596530965978,
|
| 496 |
+
-0.7028838506918503,
|
| 497 |
+
-0.13150115730668355,
|
| 498 |
+
-0.13060744123825166,
|
| 499 |
+
0.8397792745552163,
|
| 500 |
+
-0.29642171881210544,
|
| 501 |
+
0.023404424733916872,
|
| 502 |
+
0.03323390034310277,
|
| 503 |
+
0.005153534859300528,
|
| 504 |
+
0.12670043594070385,
|
| 505 |
+
-0.12135132512904276,
|
| 506 |
+
0.32688682632575744,
|
| 507 |
+
-0.34025291048965384,
|
| 508 |
+
1.0064546460331283,
|
| 509 |
+
-0.22132733376049174,
|
| 510 |
+
-0.09390540696381505,
|
| 511 |
+
0.0020294867516669796,
|
| 512 |
+
-0.9347671857865999,
|
| 513 |
+
-0.5446749532985431,
|
| 514 |
+
0.3699779073214432,
|
| 515 |
+
0.6207957483288243,
|
| 516 |
+
-0.7479217756695453,
|
| 517 |
+
0.12144748586150506,
|
| 518 |
+
0.12118187016003243,
|
| 519 |
+
0.9999840190987344,
|
| 520 |
+
0.9999818626109905,
|
| 521 |
+
0.9999802706920957,
|
| 522 |
+
0.9999796302992863,
|
| 523 |
+
0.997536483784903,
|
| 524 |
+
0.9997633830999401,
|
| 525 |
+
0.6985039807005555,
|
| 526 |
+
0.6984985546667931,
|
| 527 |
+
0.6985102459092983,
|
| 528 |
+
0.6989350363811875,
|
| 529 |
+
0.7882137827426893,
|
| 530 |
+
0.14730287148854837,
|
| 531 |
+
0.1697078753632969,
|
| 532 |
+
-0.014566843709871236,
|
| 533 |
+
-0.951296124115036
|
| 534 |
+
],
|
| 535 |
+
"std": [
|
| 536 |
+
0.8702993367372945,
|
| 537 |
+
0.06537943029111525,
|
| 538 |
+
0.07654780244438013,
|
| 539 |
+
0.7112500999676913,
|
| 540 |
+
0.145283198895165,
|
| 541 |
+
0.047866697406743985,
|
| 542 |
+
0.8545553679812813,
|
| 543 |
+
0.0720881483654181,
|
| 544 |
+
0.1478987551211821,
|
| 545 |
+
0.7925819593075105,
|
| 546 |
+
0.22834769005058556,
|
| 547 |
+
0.050678510432579586,
|
| 548 |
+
0.046478733386081675,
|
| 549 |
+
0.03356911096437694,
|
| 550 |
+
0.1052938605753584,
|
| 551 |
+
0.3001636421580595,
|
| 552 |
+
0.08770922543021444,
|
| 553 |
+
0.22980924646231987,
|
| 554 |
+
0.19216837631975336,
|
| 555 |
+
0.11281399341997446,
|
| 556 |
+
0.12302227799457731,
|
| 557 |
+
0.06405779462644502,
|
| 558 |
+
0.4714357774335524,
|
| 559 |
+
0.24364128399266738,
|
| 560 |
+
0.2753097937162136,
|
| 561 |
+
0.4954273787478825,
|
| 562 |
+
0.4550380536420718,
|
| 563 |
+
0.17488023028147637,
|
| 564 |
+
0.4290372100442338,
|
| 565 |
+
1.8502286312077823e-05,
|
| 566 |
+
2.8853457272592953e-05,
|
| 567 |
+
3.9121279481955076e-05,
|
| 568 |
+
3.6852514097164415e-05,
|
| 569 |
+
0.0025758735618069276,
|
| 570 |
+
0.00013232718803578354,
|
| 571 |
+
0.29804922992520444,
|
| 572 |
+
0.2979910347481662,
|
| 573 |
+
0.297951069217773,
|
| 574 |
+
0.29750204841817435,
|
| 575 |
+
0.20818212208894177,
|
| 576 |
+
0.34110249080644384,
|
| 577 |
+
0.24458060944891366,
|
| 578 |
+
0.02926279635978709,
|
| 579 |
+
0.07312142435045
|
| 580 |
+
]
|
| 581 |
+
},
|
| 582 |
+
"action": {
|
| 583 |
+
"min": [
|
| 584 |
+
-0.25,
|
| 585 |
+
-0.625,
|
| 586 |
+
-0.5625,
|
| 587 |
+
-0.3125,
|
| 588 |
+
-0.5625,
|
| 589 |
+
-0.5625,
|
| 590 |
+
-0.375,
|
| 591 |
+
-0.75,
|
| 592 |
+
-0.625,
|
| 593 |
+
-0.1875,
|
| 594 |
+
-0.75,
|
| 595 |
+
-0.3125,
|
| 596 |
+
-0.4375,
|
| 597 |
+
-0.375,
|
| 598 |
+
-0.6875,
|
| 599 |
+
-0.5625,
|
| 600 |
+
-0.625,
|
| 601 |
+
-0.375,
|
| 602 |
+
-0.5625,
|
| 603 |
+
-0.4375,
|
| 604 |
+
-0.375,
|
| 605 |
+
-0.5,
|
| 606 |
+
-0.4375,
|
| 607 |
+
-0.4375,
|
| 608 |
+
-0.5625,
|
| 609 |
+
0.0625,
|
| 610 |
+
-0.4375,
|
| 611 |
+
-0.4375,
|
| 612 |
+
-0.375,
|
| 613 |
+
-0.4375,
|
| 614 |
+
-0.0625,
|
| 615 |
+
-0.25,
|
| 616 |
+
-0.3125,
|
| 617 |
+
-0.4375,
|
| 618 |
+
-0.4375,
|
| 619 |
+
-0.625,
|
| 620 |
+
-0.25,
|
| 621 |
+
-0.8125,
|
| 622 |
+
-0.3125,
|
| 623 |
+
-0.1875,
|
| 624 |
+
-0.4375,
|
| 625 |
+
-0.5,
|
| 626 |
+
-0.3125,
|
| 627 |
+
0.0,
|
| 628 |
+
-0.625,
|
| 629 |
+
-0.3125,
|
| 630 |
+
-0.6875,
|
| 631 |
+
-0.375,
|
| 632 |
+
-0.125,
|
| 633 |
+
-0.625,
|
| 634 |
+
-0.375,
|
| 635 |
+
-0.8125,
|
| 636 |
+
-0.4375,
|
| 637 |
+
-0.625,
|
| 638 |
+
-0.3125,
|
| 639 |
+
-0.4375,
|
| 640 |
+
-0.4375,
|
| 641 |
+
-0.75,
|
| 642 |
+
-0.625,
|
| 643 |
+
-0.375,
|
| 644 |
+
-0.625,
|
| 645 |
+
-0.4375,
|
| 646 |
+
-0.4375,
|
| 647 |
+
-0.3125,
|
| 648 |
+
0.9996309876441956,
|
| 649 |
+
0.9991293549537659,
|
| 650 |
+
0.9988874793052673,
|
| 651 |
+
0.9989415407180786,
|
| 652 |
+
0.9291336536407471,
|
| 653 |
+
0.9961293935775757,
|
| 654 |
+
0.3990069329738617,
|
| 655 |
+
0.3997034728527069,
|
| 656 |
+
0.39968419075012207,
|
| 657 |
+
0.40040892362594604,
|
| 658 |
+
0.5608876347541809,
|
| 659 |
+
0.0
|
| 660 |
+
],
|
| 661 |
+
"max": [
|
| 662 |
+
0.5,
|
| 663 |
+
0.3125,
|
| 664 |
+
0.5,
|
| 665 |
+
0.4375,
|
| 666 |
+
0.25,
|
| 667 |
+
0.25,
|
| 668 |
+
0.3125,
|
| 669 |
+
0.1875,
|
| 670 |
+
0.375,
|
| 671 |
+
0.375,
|
| 672 |
+
0.125,
|
| 673 |
+
0.375,
|
| 674 |
+
0.4375,
|
| 675 |
+
0.4375,
|
| 676 |
+
0.3125,
|
| 677 |
+
0.25,
|
| 678 |
+
0.4375,
|
| 679 |
+
0.5625,
|
| 680 |
+
0.125,
|
| 681 |
+
0.5625,
|
| 682 |
+
0.1875,
|
| 683 |
+
0.125,
|
| 684 |
+
0.5,
|
| 685 |
+
0.375,
|
| 686 |
+
0.0625,
|
| 687 |
+
0.5625,
|
| 688 |
+
0.1875,
|
| 689 |
+
0.25,
|
| 690 |
+
0.3125,
|
| 691 |
+
0.25,
|
| 692 |
+
0.6875,
|
| 693 |
+
0.4375,
|
| 694 |
+
0.3125,
|
| 695 |
+
0.4375,
|
| 696 |
+
0.5,
|
| 697 |
+
0.25,
|
| 698 |
+
0.625,
|
| 699 |
+
0.125,
|
| 700 |
+
0.375,
|
| 701 |
+
0.5625,
|
| 702 |
+
0.1875,
|
| 703 |
+
0.375,
|
| 704 |
+
0.25,
|
| 705 |
+
0.5,
|
| 706 |
+
0.1875,
|
| 707 |
+
0.5,
|
| 708 |
+
0.4375,
|
| 709 |
+
0.3125,
|
| 710 |
+
0.5625,
|
| 711 |
+
0.25,
|
| 712 |
+
0.375,
|
| 713 |
+
0.375,
|
| 714 |
+
0.6875,
|
| 715 |
+
0.1875,
|
| 716 |
+
0.5,
|
| 717 |
+
0.625,
|
| 718 |
+
0.5,
|
| 719 |
+
0.375,
|
| 720 |
+
0.375,
|
| 721 |
+
0.5,
|
| 722 |
+
0.125,
|
| 723 |
+
0.625,
|
| 724 |
+
0.4375,
|
| 725 |
+
0.6875,
|
| 726 |
+
1.0,
|
| 727 |
+
1.0,
|
| 728 |
+
1.0,
|
| 729 |
+
1.0,
|
| 730 |
+
1.0,
|
| 731 |
+
1.0,
|
| 732 |
+
1.0,
|
| 733 |
+
1.0,
|
| 734 |
+
1.0,
|
| 735 |
+
1.0,
|
| 736 |
+
1.0,
|
| 737 |
+
1.0
|
| 738 |
+
],
|
| 739 |
+
"mean": [
|
| 740 |
+
0.20233245104145042,
|
| 741 |
+
-0.15635379904504879,
|
| 742 |
+
0.1067746176735174,
|
| 743 |
+
0.1295577872350241,
|
| 744 |
+
-0.15413581528383272,
|
| 745 |
+
-0.24018450280257422,
|
| 746 |
+
0.04108495951837243,
|
| 747 |
+
-0.22379362443198855,
|
| 748 |
+
-0.09086380988628238,
|
| 749 |
+
0.051021555601688466,
|
| 750 |
+
-0.3685197679514682,
|
| 751 |
+
0.08125518995225244,
|
| 752 |
+
-0.03551801490092958,
|
| 753 |
+
-0.014731535303208544,
|
| 754 |
+
-0.19714538209581806,
|
| 755 |
+
-0.213527610545983,
|
| 756 |
+
-0.00988757986759855,
|
| 757 |
+
0.08513684174105599,
|
| 758 |
+
-0.22502335478513597,
|
| 759 |
+
0.07740020875141282,
|
| 760 |
+
-0.1662010126173506,
|
| 761 |
+
-0.24570747699121168,
|
| 762 |
+
-0.06387389569349296,
|
| 763 |
+
-0.050509768643461815,
|
| 764 |
+
-0.1940551980255115,
|
| 765 |
+
0.34620225243927755,
|
| 766 |
+
-0.19457203077065024,
|
| 767 |
+
-0.17379996770696376,
|
| 768 |
+
0.0011360228819228197,
|
| 769 |
+
-0.08769433487878578,
|
| 770 |
+
0.3568322838096556,
|
| 771 |
+
0.1458167543191936,
|
| 772 |
+
-0.02182663252831407,
|
| 773 |
+
0.06301971605194566,
|
| 774 |
+
0.0789910732821258,
|
| 775 |
+
-0.3288296081009388,
|
| 776 |
+
0.1761289587802459,
|
| 777 |
+
-0.35309407653449587,
|
| 778 |
+
-0.05148288469079418,
|
| 779 |
+
0.18985494083454432,
|
| 780 |
+
-0.09348833990727286,
|
| 781 |
+
-0.12202947316218024,
|
| 782 |
+
-0.10901494706248703,
|
| 783 |
+
0.26305272991488476,
|
| 784 |
+
-0.22518193665951605,
|
| 785 |
+
-0.027526930085576547,
|
| 786 |
+
-0.16906990289022675,
|
| 787 |
+
-0.015603735612299033,
|
| 788 |
+
0.20928987036652597,
|
| 789 |
+
-0.2469970359606025,
|
| 790 |
+
-0.03280698567573178,
|
| 791 |
+
-0.1797648086637603,
|
| 792 |
+
0.3433283163794893,
|
| 793 |
+
-0.20959910502156714,
|
| 794 |
+
0.04331375568011441,
|
| 795 |
+
0.2624104733236454,
|
| 796 |
+
-0.12965365718635388,
|
| 797 |
+
-0.10195733282587134,
|
| 798 |
+
-0.3011585126750167,
|
| 799 |
+
0.17579233271053907,
|
| 800 |
+
-0.25617388070029756,
|
| 801 |
+
0.17960766844278367,
|
| 802 |
+
0.12395984706940696,
|
| 803 |
+
0.2832128111088045,
|
| 804 |
+
0.9999840190987344,
|
| 805 |
+
0.9999818626109905,
|
| 806 |
+
0.9999802706920957,
|
| 807 |
+
0.9999796302992863,
|
| 808 |
+
0.997536483784903,
|
| 809 |
+
0.9997633830999401,
|
| 810 |
+
0.6985039807005555,
|
| 811 |
+
0.6984985546667931,
|
| 812 |
+
0.6985102459092983,
|
| 813 |
+
0.6989350363811875,
|
| 814 |
+
0.7882137827426893,
|
| 815 |
+
0.14730287148854837
|
| 816 |
+
],
|
| 817 |
+
"std": [
|
| 818 |
+
0.14387889849464017,
|
| 819 |
+
0.22002725850755592,
|
| 820 |
+
0.17023058244057782,
|
| 821 |
+
0.12799376567512302,
|
| 822 |
+
0.14669566547477705,
|
| 823 |
+
0.17137918871048685,
|
| 824 |
+
0.10837036550509957,
|
| 825 |
+
0.24967630650194603,
|
| 826 |
+
0.3167673937030814,
|
| 827 |
+
0.13791457708463964,
|
| 828 |
+
0.1558879249225253,
|
| 829 |
+
0.10944088727655074,
|
| 830 |
+
0.21023136387156308,
|
| 831 |
+
0.13129675029615331,
|
| 832 |
+
0.2763938721515471,
|
| 833 |
+
0.14623609832182455,
|
| 834 |
+
0.35032697342667946,
|
| 835 |
+
0.14687161314161287,
|
| 836 |
+
0.09447772092749067,
|
| 837 |
+
0.28749075482259157,
|
| 838 |
+
0.10602082258665294,
|
| 839 |
+
0.13892427833485307,
|
| 840 |
+
0.16994943275056978,
|
| 841 |
+
0.1442771380532549,
|
| 842 |
+
0.0977608285517821,
|
| 843 |
+
0.08765465031102393,
|
| 844 |
+
0.14403055417943056,
|
| 845 |
+
0.1492474485468382,
|
| 846 |
+
0.13164447070933707,
|
| 847 |
+
0.1500123078688166,
|
| 848 |
+
0.17029337028108626,
|
| 849 |
+
0.11127976794851127,
|
| 850 |
+
0.09071197151363286,
|
| 851 |
+
0.22299894138544968,
|
| 852 |
+
0.30077203584339085,
|
| 853 |
+
0.19527291668407834,
|
| 854 |
+
0.15449669204830557,
|
| 855 |
+
0.2616432744537317,
|
| 856 |
+
0.10971484752905038,
|
| 857 |
+
0.2031555804379325,
|
| 858 |
+
0.15751704689763124,
|
| 859 |
+
0.20958523064765439,
|
| 860 |
+
0.07314237295780124,
|
| 861 |
+
0.10866238282425084,
|
| 862 |
+
0.20908864030616714,
|
| 863 |
+
0.22004042023819897,
|
| 864 |
+
0.2893527840649329,
|
| 865 |
+
0.13174662906263046,
|
| 866 |
+
0.10049584022270718,
|
| 867 |
+
0.19328266323665458,
|
| 868 |
+
0.09645590365939917,
|
| 869 |
+
0.3613390428120311,
|
| 870 |
+
0.28011666359209003,
|
| 871 |
+
0.18888580642737607,
|
| 872 |
+
0.25113400201108055,
|
| 873 |
+
0.2307348262267991,
|
| 874 |
+
0.25063238299275425,
|
| 875 |
+
0.42747866380539706,
|
| 876 |
+
0.20811619893271996,
|
| 877 |
+
0.15748165255971092,
|
| 878 |
+
0.11924260634895344,
|
| 879 |
+
0.27838897468038204,
|
| 880 |
+
0.14163213034462338,
|
| 881 |
+
0.25291184983402537,
|
| 882 |
+
1.8502286312077823e-05,
|
| 883 |
+
2.8853457272592953e-05,
|
| 884 |
+
3.9121279481955076e-05,
|
| 885 |
+
3.6852514097164415e-05,
|
| 886 |
+
0.0025758735618069276,
|
| 887 |
+
0.00013232718803578354,
|
| 888 |
+
0.29804922992520444,
|
| 889 |
+
0.2979910347481662,
|
| 890 |
+
0.297951069217773,
|
| 891 |
+
0.29750204841817435,
|
| 892 |
+
0.20818212208894177,
|
| 893 |
+
0.34110249080644384
|
| 894 |
+
]
|
| 895 |
+
}
|
| 896 |
+
},
|
| 897 |
+
"code_commit": "2c91a514d65897635ae769a3e00d318a9be385cb",
|
| 898 |
+
"step": 2000,
|
| 899 |
+
"weights": "ema",
|
| 900 |
+
"offline_eval": {
|
| 901 |
+
"mse": 0.006051867268979549,
|
| 902 |
+
"mse_row0": 0.005976332817226648,
|
| 903 |
+
"mse_motion_token": 0.005685463547706604,
|
| 904 |
+
"mse_inspire_left_hand_state": 0.002685042330995202,
|
| 905 |
+
"mse_inspire_right_hand_state": 0.013327006250619888,
|
| 906 |
+
"samples": 256,
|
| 907 |
+
"frames": "train"
|
| 908 |
+
},
|
| 909 |
+
"format": "hb_baselines/1"
|
| 910 |
+
}
|
a21-floor-basket-transfer/b512/step-002000/model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81170ea6dce1ef99740354b8e4aba4981726c4c983d7db9f219d81eb2334a944
|
| 3 |
+
size 336138027
|
a21-floor-basket-transfer/b512/step-002000/protocol.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format": "hb_baselines/1",
|
| 3 |
+
"step": 2000,
|
| 4 |
+
"policy": "act",
|
| 5 |
+
"files": {
|
| 6 |
+
"config.json": {
|
| 7 |
+
"bytes": 15780,
|
| 8 |
+
"sha256": "73d500b9431ecc8d794d14d81d6dc6c3b754f2d362ba64cbeb5266368063e351"
|
| 9 |
+
},
|
| 10 |
+
"model.pt": {
|
| 11 |
+
"bytes": 336138027,
|
| 12 |
+
"sha256": "81170ea6dce1ef99740354b8e4aba4981726c4c983d7db9f219d81eb2334a944"
|
| 13 |
+
}
|
| 14 |
+
},
|
| 15 |
+
"task_dir": "a21-floor-basket-transfer",
|
| 16 |
+
"training_data": "humanoid-benchmark/a21-floor-transfer-basket-trim-raw-head-expert-v1 @682f2bfc (30 Hz), all 100 episodes; cameras ego_view + chest",
|
| 17 |
+
"episodes": 100,
|
| 18 |
+
"frames": 86706,
|
| 19 |
+
"steps": 4000,
|
| 20 |
+
"global_batch": 512,
|
| 21 |
+
"per_gpu_batch": 512,
|
| 22 |
+
"num_gpus": 1,
|
| 23 |
+
"gradient_accumulation_steps": 1,
|
| 24 |
+
"save_steps": [
|
| 25 |
+
2000,
|
| 26 |
+
4000
|
| 27 |
+
],
|
| 28 |
+
"lr": 0.0001,
|
| 29 |
+
"lr_schedule": "linear warm-up + cosine after a 200-step linear warm-up",
|
| 30 |
+
"ema": 0.9999,
|
| 31 |
+
"augmentation": "Humanoid Benchmark online augmentation spec v2 (hb-aug-v2-20261109): 15 visual effects, one per sample at 1.5x; proprio per-joint bias U(+-2 deg) + N(0, 0.25 deg); no delay, no history drop; model-native image augmentation off",
|
| 32 |
+
"state_dim": 44,
|
| 33 |
+
"action_dim": 76,
|
| 34 |
+
"cameras": [
|
| 35 |
+
"ego_view",
|
| 36 |
+
"chest"
|
| 37 |
+
],
|
| 38 |
+
"contract": "g1_sonic_dfx6",
|
| 39 |
+
"image_hw": [
|
| 40 |
+
168,
|
| 41 |
+
224
|
| 42 |
+
],
|
| 43 |
+
"task_text": "Grasp the basket handle with the right hand from the floor, stand up while retaining it, carry it to the long desk, then place and release it on the tabletop.",
|
| 44 |
+
"inloop_mse": {
|
| 45 |
+
"task": "a21",
|
| 46 |
+
"split": "train10",
|
| 47 |
+
"every": 250,
|
| 48 |
+
"seed": 1234,
|
| 49 |
+
"weights": "ema",
|
| 50 |
+
"nmse_at_this_step": 0.0353,
|
| 51 |
+
"curve": {
|
| 52 |
+
"250": 0.1224,
|
| 53 |
+
"500": 0.0785,
|
| 54 |
+
"750": 0.0654,
|
| 55 |
+
"1000": 0.0536,
|
| 56 |
+
"1250": 0.0446,
|
| 57 |
+
"1500": 0.0401,
|
| 58 |
+
"1750": 0.0372,
|
| 59 |
+
"2000": 0.0353,
|
| 60 |
+
"2250": 0.0338,
|
| 61 |
+
"2500": 0.0326,
|
| 62 |
+
"2750": 0.0314,
|
| 63 |
+
"3000": 0.0304,
|
| 64 |
+
"3250": 0.0298,
|
| 65 |
+
"3500": 0.0293,
|
| 66 |
+
"3750": 0.029,
|
| 67 |
+
"4000": 0.0288
|
| 68 |
+
}
|
| 69 |
+
},
|
| 70 |
+
"seed": 0,
|
| 71 |
+
"reproducibility": {
|
| 72 |
+
"protocol": "https://github.com/zuo-kuangji/HumanWAM/blob/bai/hb_training/REPRODUCIBILITY.md",
|
| 73 |
+
"protocol_commit": "6814d6c",
|
| 74 |
+
"training_seed": 0,
|
| 75 |
+
"training_seed_source": "hb_baselines DEFAULTS seed 0 (= the published act b512* folders)",
|
| 76 |
+
"training_seed_verified_from_run_files": true,
|
| 77 |
+
"augmentation_random_stream": "seeded: numpy default_rng([HB_AUG_SEED=0, torch.initial_seed(), worker id])",
|
| 78 |
+
"inloop_mse_seed": 1234,
|
| 79 |
+
"layout": {
|
| 80 |
+
"nodes": 1,
|
| 81 |
+
"gpus_per_node": 1,
|
| 82 |
+
"per_gpu_batch": 512,
|
| 83 |
+
"global_batch": 512,
|
| 84 |
+
"gradient_accumulation": 1,
|
| 85 |
+
"num_workers": 32,
|
| 86 |
+
"prefetch": 2
|
| 87 |
+
},
|
| 88 |
+
"environment": "hb-baselines (evaluation/baselines/requirements.txt: Python 3.12.1, torch 2.9.0+cu128, torchvision 0.24.0); training_records/pip_freeze_hb-baselines.txt",
|
| 89 |
+
"hardware": "Alibaba Cloud PAI DLC A800 cluster (dlc19te5fv9wtn5t / dlc1plp7nvyo11cd), 1 x NVIDIA A800 80 GB",
|
| 90 |
+
"upstream_code": "github.com/zuo-kuangji/Humanoid_benchmark bai @ 2c91a514d65897635ae769a3e00d318a9be385cb (evaluation/baselines/train.py --policy act --contract g1_sonic_dfx6)",
|
| 91 |
+
"determinism": "statistical reproducibility: same data commit, config, seed and layout give the same curves within run-to-run noise; GPU kernels are not bitwise deterministic",
|
| 92 |
+
"exceptions": []
|
| 93 |
+
},
|
| 94 |
+
"inference": "Humanoid_benchmark evaluation/policy/ACT (evaluation/baselines/adapters.py, runtime.BaselinePolicy) loads this folder (config.json + model.pt); training_records/code_* in the last checkpoint is the exact code",
|
| 95 |
+
"resume_state_included": false
|
| 96 |
+
}
|
a21-floor-basket-transfer/b512/step-004000/SHA256SUMS
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dffda0de03c96d5670e71e01255a1f4c0110e58a6c529988e99516fc8792fa14 config.json
|
| 2 |
+
14329a96d2fd00a317e6f53484e805d34cbe120687e34c919ea548a381da0e13 model.pt
|
| 3 |
+
9ae81cb9f403a35b8447ff61e5f779075cbc52422fcc6d84516a71302e8fb51a protocol.json
|
| 4 |
+
9f7713cea4f846efcfc924234267ced48210357f419d67915c10b504316bedde training_records/code_2c91a514/evaluation/augmentation/hb_aug_v2.py
|
| 5 |
+
47706f0d012b81a58da0742e82395a9a125cd56b7c99ffff7a9809bc43a517a3 training_records/code_2c91a514/evaluation/baselines/__init__.py
|
| 6 |
+
3db95cd8e4e436875e11f1054a99d250ca7d94e0127909090b58730402340f19 training_records/code_2c91a514/evaluation/baselines/act_nets.py
|
| 7 |
+
87e47332381fcb34e75d08cb258475c200519cb5cf17fd0e218bf2a1b21fa890 training_records/code_2c91a514/evaluation/baselines/adapters.py
|
| 8 |
+
aa7fc175f50de83b130427cc30533a45220e70d0ed8c807f33ca44d39cb9fb81 training_records/code_2c91a514/evaluation/baselines/check_flash_adapter.py
|
| 9 |
+
91f714aa3b7ec6b5c28764496163671cadabe4a833c0b06b6bc4c155cec7f66f training_records/code_2c91a514/evaluation/baselines/check_flash_parity.py
|
| 10 |
+
8317d72b683440bc8ac2b37e4be8b9c1783ae1731d3786a10f6c17039202e809 training_records/code_2c91a514/evaluation/baselines/data.py
|
| 11 |
+
35c01a4e2edd80f85878b37928069c09ed3238127bbb51a5443e7f1c92703e53 training_records/code_2c91a514/evaluation/baselines/flash.py
|
| 12 |
+
0e6343d7d28893c4107864b943193eb4a402cf97b1625e94eb2acb1d163ca85c training_records/code_2c91a514/evaluation/baselines/inloop.py
|
| 13 |
+
2d72e3c455d5e376a6f5954886fd4c7a6478eb516380c6a05515fa043c62fbce training_records/code_2c91a514/evaluation/baselines/nets.py
|
| 14 |
+
38f2ea6050fa45e6c0d5e3f19caf21f1a72a50f80e356044dddcf76da22b144a training_records/code_2c91a514/evaluation/baselines/ode_nets.py
|
| 15 |
+
a890fc3ce8274812aaea3ed9ad57a35f9cedeb60d05c33d19cf79942dd4724ca training_records/code_2c91a514/evaluation/baselines/policies.py
|
| 16 |
+
bb211f66038e53efd08ee3ec03e133d8bb206ec36cc608d349b4fad3a61e874b training_records/code_2c91a514/evaluation/baselines/requirements.txt
|
| 17 |
+
7c768f4895e9c24f403e2f942ee22218cfe61b785d1ce6ef7947205a0a17e115 training_records/code_2c91a514/evaluation/baselines/runtime.py
|
| 18 |
+
e827afa457186cf64419d337b8c9591afbf6b2eb32dceb5a9f3d9856aa4a38f3 training_records/code_2c91a514/evaluation/baselines/train.py
|
| 19 |
+
593889e0403303d97820d46a6808aed24a3f2cc950dc11310fa305136fbd27c1 training_records/code_2c91a514/evaluation/policy/ACT/model.py
|
| 20 |
+
2b7768565ccd4d6384b3609387fb974b6154a792c96e29a09bfd396c55e7e060 training_records/code_commit.txt
|
| 21 |
+
5e4fad280630807909582b1c9913015111364d9b80819baf605515bf4699da78 training_records/inloop-mse.jsonl
|
| 22 |
+
72942d6f1c95ab99ba51fcf641bfd0e4cb34943c5b19a2a39d8da72ef5daa6b2 training_records/pip_freeze_hb-baselines.txt
|
| 23 |
+
06db5fb4571421f778191f821a23641efa008f3809d7f7a7b22dd7f1cffc8b4f training_records/run.json
|
| 24 |
+
0971c01fafda822a3239fc060387365ed895c921e93f5df5b9c76b9a78448f5d training_records/train.log
|
| 25 |
+
e13cae2317654a1d7b6e739d648f1bfc9b4c775df7e48256331dd4b054d9cf02 training_records/train_log.jsonl
|
a21-floor-basket-transfer/b512/step-004000/config.json
ADDED
|
@@ -0,0 +1,910 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"policy": {
|
| 3 |
+
"policy": "act",
|
| 4 |
+
"n_cameras": 2,
|
| 5 |
+
"state_dim": 44,
|
| 6 |
+
"action_dim": 76,
|
| 7 |
+
"horizon": 16,
|
| 8 |
+
"backbone": "resnet18",
|
| 9 |
+
"backbone_weights": "IMAGENET1K_V1",
|
| 10 |
+
"backbone_norm": "frozen_bn",
|
| 11 |
+
"hidden_dim": 384,
|
| 12 |
+
"num_layers": 4,
|
| 13 |
+
"num_heads": 8,
|
| 14 |
+
"mlp_ratio": 4.0,
|
| 15 |
+
"dropout": 0.1,
|
| 16 |
+
"time_embed_dim": 128,
|
| 17 |
+
"num_inference_steps": null,
|
| 18 |
+
"num_train_timesteps": 100,
|
| 19 |
+
"beta_schedule": "squaredcos_cap_v2",
|
| 20 |
+
"prediction_type": "epsilon",
|
| 21 |
+
"clip_sample": true,
|
| 22 |
+
"act_hidden_dim": 512,
|
| 23 |
+
"dim_feedforward": 3200,
|
| 24 |
+
"enc_layers": 4,
|
| 25 |
+
"dec_layers": 7,
|
| 26 |
+
"nheads": 8,
|
| 27 |
+
"latent_dim": 32,
|
| 28 |
+
"kl_weight": 10.0,
|
| 29 |
+
"ode_body_dim": null,
|
| 30 |
+
"ode_width": 512,
|
| 31 |
+
"ode_layers": 4,
|
| 32 |
+
"ode_cond_dim": 512,
|
| 33 |
+
"ode_field_scale": 1.0,
|
| 34 |
+
"ode_dit_hidden": 512,
|
| 35 |
+
"ode_dit_layers": 4,
|
| 36 |
+
"ode_dit_heads": 8,
|
| 37 |
+
"ode_dit_tokens": 4,
|
| 38 |
+
"extra": {}
|
| 39 |
+
},
|
| 40 |
+
"contract": {
|
| 41 |
+
"name": "g1_sonic_dfx6",
|
| 42 |
+
"robot": "g1",
|
| 43 |
+
"cameras": [
|
| 44 |
+
"ego_view",
|
| 45 |
+
"chest"
|
| 46 |
+
],
|
| 47 |
+
"state": [
|
| 48 |
+
[
|
| 49 |
+
"observation.state",
|
| 50 |
+
0,
|
| 51 |
+
29
|
| 52 |
+
],
|
| 53 |
+
[
|
| 54 |
+
"observation.inspire_left_hand_state",
|
| 55 |
+
0,
|
| 56 |
+
6
|
| 57 |
+
],
|
| 58 |
+
[
|
| 59 |
+
"observation.inspire_right_hand_state",
|
| 60 |
+
0,
|
| 61 |
+
6
|
| 62 |
+
],
|
| 63 |
+
[
|
| 64 |
+
"observation.projected_gravity",
|
| 65 |
+
0,
|
| 66 |
+
3
|
| 67 |
+
]
|
| 68 |
+
],
|
| 69 |
+
"action": [
|
| 70 |
+
[
|
| 71 |
+
"action.motion_token",
|
| 72 |
+
0,
|
| 73 |
+
64
|
| 74 |
+
],
|
| 75 |
+
[
|
| 76 |
+
"observation.inspire_left_hand_state",
|
| 77 |
+
0,
|
| 78 |
+
6
|
| 79 |
+
],
|
| 80 |
+
[
|
| 81 |
+
"observation.inspire_right_hand_state",
|
| 82 |
+
0,
|
| 83 |
+
6
|
| 84 |
+
]
|
| 85 |
+
],
|
| 86 |
+
"state_dim": 44,
|
| 87 |
+
"action_dim": 76,
|
| 88 |
+
"action_space": "sonic_dfx6",
|
| 89 |
+
"body_dims": 29
|
| 90 |
+
},
|
| 91 |
+
"image_hw": [
|
| 92 |
+
168,
|
| 93 |
+
224
|
| 94 |
+
],
|
| 95 |
+
"task_text": "Grasp the basket handle with the right hand from the floor, stand up while retaining it, carry it to the long desk, then place and release it on the tabletop.",
|
| 96 |
+
"dataset": {
|
| 97 |
+
"name": "data",
|
| 98 |
+
"root": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a21-floor-transfer-basket-682f2bf/data",
|
| 99 |
+
"robot_type": null,
|
| 100 |
+
"fps": 30.0,
|
| 101 |
+
"episodes": [
|
| 102 |
+
0,
|
| 103 |
+
1,
|
| 104 |
+
2,
|
| 105 |
+
3,
|
| 106 |
+
4,
|
| 107 |
+
5,
|
| 108 |
+
6,
|
| 109 |
+
7,
|
| 110 |
+
8,
|
| 111 |
+
9,
|
| 112 |
+
10,
|
| 113 |
+
11,
|
| 114 |
+
12,
|
| 115 |
+
13,
|
| 116 |
+
14,
|
| 117 |
+
15,
|
| 118 |
+
16,
|
| 119 |
+
17,
|
| 120 |
+
18,
|
| 121 |
+
19,
|
| 122 |
+
20,
|
| 123 |
+
21,
|
| 124 |
+
22,
|
| 125 |
+
23,
|
| 126 |
+
24,
|
| 127 |
+
25,
|
| 128 |
+
26,
|
| 129 |
+
27,
|
| 130 |
+
28,
|
| 131 |
+
29,
|
| 132 |
+
30,
|
| 133 |
+
31,
|
| 134 |
+
32,
|
| 135 |
+
33,
|
| 136 |
+
34,
|
| 137 |
+
35,
|
| 138 |
+
36,
|
| 139 |
+
37,
|
| 140 |
+
38,
|
| 141 |
+
39,
|
| 142 |
+
40,
|
| 143 |
+
41,
|
| 144 |
+
42,
|
| 145 |
+
43,
|
| 146 |
+
44,
|
| 147 |
+
45,
|
| 148 |
+
46,
|
| 149 |
+
47,
|
| 150 |
+
48,
|
| 151 |
+
49,
|
| 152 |
+
50,
|
| 153 |
+
51,
|
| 154 |
+
52,
|
| 155 |
+
53,
|
| 156 |
+
54,
|
| 157 |
+
55,
|
| 158 |
+
56,
|
| 159 |
+
57,
|
| 160 |
+
58,
|
| 161 |
+
59,
|
| 162 |
+
60,
|
| 163 |
+
61,
|
| 164 |
+
62,
|
| 165 |
+
63,
|
| 166 |
+
64,
|
| 167 |
+
65,
|
| 168 |
+
66,
|
| 169 |
+
67,
|
| 170 |
+
68,
|
| 171 |
+
69,
|
| 172 |
+
70,
|
| 173 |
+
71,
|
| 174 |
+
72,
|
| 175 |
+
73,
|
| 176 |
+
74,
|
| 177 |
+
75,
|
| 178 |
+
76,
|
| 179 |
+
77,
|
| 180 |
+
78,
|
| 181 |
+
79,
|
| 182 |
+
80,
|
| 183 |
+
81,
|
| 184 |
+
82,
|
| 185 |
+
83,
|
| 186 |
+
84,
|
| 187 |
+
85,
|
| 188 |
+
86,
|
| 189 |
+
87,
|
| 190 |
+
88,
|
| 191 |
+
89,
|
| 192 |
+
90,
|
| 193 |
+
91,
|
| 194 |
+
92,
|
| 195 |
+
93,
|
| 196 |
+
94,
|
| 197 |
+
95,
|
| 198 |
+
96,
|
| 199 |
+
97,
|
| 200 |
+
98,
|
| 201 |
+
99
|
| 202 |
+
],
|
| 203 |
+
"train_episodes": [
|
| 204 |
+
0,
|
| 205 |
+
1,
|
| 206 |
+
2,
|
| 207 |
+
3,
|
| 208 |
+
4,
|
| 209 |
+
5,
|
| 210 |
+
6,
|
| 211 |
+
7,
|
| 212 |
+
8,
|
| 213 |
+
9,
|
| 214 |
+
10,
|
| 215 |
+
11,
|
| 216 |
+
12,
|
| 217 |
+
13,
|
| 218 |
+
14,
|
| 219 |
+
15,
|
| 220 |
+
16,
|
| 221 |
+
17,
|
| 222 |
+
18,
|
| 223 |
+
19,
|
| 224 |
+
20,
|
| 225 |
+
21,
|
| 226 |
+
22,
|
| 227 |
+
23,
|
| 228 |
+
24,
|
| 229 |
+
25,
|
| 230 |
+
26,
|
| 231 |
+
27,
|
| 232 |
+
28,
|
| 233 |
+
29,
|
| 234 |
+
30,
|
| 235 |
+
31,
|
| 236 |
+
32,
|
| 237 |
+
33,
|
| 238 |
+
34,
|
| 239 |
+
35,
|
| 240 |
+
36,
|
| 241 |
+
37,
|
| 242 |
+
38,
|
| 243 |
+
39,
|
| 244 |
+
40,
|
| 245 |
+
41,
|
| 246 |
+
42,
|
| 247 |
+
43,
|
| 248 |
+
44,
|
| 249 |
+
45,
|
| 250 |
+
46,
|
| 251 |
+
47,
|
| 252 |
+
48,
|
| 253 |
+
49,
|
| 254 |
+
50,
|
| 255 |
+
51,
|
| 256 |
+
52,
|
| 257 |
+
53,
|
| 258 |
+
54,
|
| 259 |
+
55,
|
| 260 |
+
56,
|
| 261 |
+
57,
|
| 262 |
+
58,
|
| 263 |
+
59,
|
| 264 |
+
60,
|
| 265 |
+
61,
|
| 266 |
+
62,
|
| 267 |
+
63,
|
| 268 |
+
64,
|
| 269 |
+
65,
|
| 270 |
+
66,
|
| 271 |
+
67,
|
| 272 |
+
68,
|
| 273 |
+
69,
|
| 274 |
+
70,
|
| 275 |
+
71,
|
| 276 |
+
72,
|
| 277 |
+
73,
|
| 278 |
+
74,
|
| 279 |
+
75,
|
| 280 |
+
76,
|
| 281 |
+
77,
|
| 282 |
+
78,
|
| 283 |
+
79,
|
| 284 |
+
80,
|
| 285 |
+
81,
|
| 286 |
+
82,
|
| 287 |
+
83,
|
| 288 |
+
84,
|
| 289 |
+
85,
|
| 290 |
+
86,
|
| 291 |
+
87,
|
| 292 |
+
88,
|
| 293 |
+
89,
|
| 294 |
+
90,
|
| 295 |
+
91,
|
| 296 |
+
92,
|
| 297 |
+
93,
|
| 298 |
+
94,
|
| 299 |
+
95,
|
| 300 |
+
96,
|
| 301 |
+
97,
|
| 302 |
+
98,
|
| 303 |
+
99
|
| 304 |
+
],
|
| 305 |
+
"val_episodes": [],
|
| 306 |
+
"train_frames": 86706,
|
| 307 |
+
"git_commit": null
|
| 308 |
+
},
|
| 309 |
+
"training": {
|
| 310 |
+
"steps": 4000,
|
| 311 |
+
"batch_size": 512,
|
| 312 |
+
"lr": 0.0001,
|
| 313 |
+
"betas": [
|
| 314 |
+
0.95,
|
| 315 |
+
0.999
|
| 316 |
+
],
|
| 317 |
+
"weight_decay": 1e-06,
|
| 318 |
+
"warmup": 200,
|
| 319 |
+
"schedule": "linear warm-up + cosine",
|
| 320 |
+
"backbone_lr_scale": 0.1,
|
| 321 |
+
"ema": 0.9999,
|
| 322 |
+
"shift_px": 0,
|
| 323 |
+
"amp": true,
|
| 324 |
+
"seed": 0,
|
| 325 |
+
"augmentation": {
|
| 326 |
+
"spec": "docs/augmentation_v2.md",
|
| 327 |
+
"version": "hb-aug-v2-20261109",
|
| 328 |
+
"implementation": "evaluation/augmentation/hb_aug_v2.py",
|
| 329 |
+
"visual": {
|
| 330 |
+
"effects": [
|
| 331 |
+
"exposure",
|
| 332 |
+
"contrast",
|
| 333 |
+
"saturation",
|
| 334 |
+
"hue",
|
| 335 |
+
"gamma",
|
| 336 |
+
"temperature",
|
| 337 |
+
"rotation_crop",
|
| 338 |
+
"noise",
|
| 339 |
+
"gaussian_blur",
|
| 340 |
+
"jpeg",
|
| 341 |
+
"motion_blur",
|
| 342 |
+
"sharpen",
|
| 343 |
+
"defocus",
|
| 344 |
+
"light_shadow",
|
| 345 |
+
"wb_channel"
|
| 346 |
+
],
|
| 347 |
+
"boosted_per_sample": 1,
|
| 348 |
+
"boost": 1.5,
|
| 349 |
+
"pixel_scale": "H / 224",
|
| 350 |
+
"future_targets": "none (one observation frame)"
|
| 351 |
+
},
|
| 352 |
+
"proprio": {
|
| 353 |
+
"robot": "g1",
|
| 354 |
+
"body_dims": 29,
|
| 355 |
+
"bias_deg": 2.0,
|
| 356 |
+
"bias_scope": "per_sample",
|
| 357 |
+
"noise_deg": 0.25,
|
| 358 |
+
"noise_clip_sigma": 3,
|
| 359 |
+
"delay_probability": 0.0,
|
| 360 |
+
"history_drop_probability": 0.0,
|
| 361 |
+
"velocity": false
|
| 362 |
+
},
|
| 363 |
+
"native_image_augmentation": "off",
|
| 364 |
+
"evaluation": "off"
|
| 365 |
+
},
|
| 366 |
+
"preflight": {
|
| 367 |
+
"samples": 64,
|
| 368 |
+
"state_dim": 44,
|
| 369 |
+
"body_dims": 29,
|
| 370 |
+
"images_changed": 64,
|
| 371 |
+
"body_values_moved": 1.0,
|
| 372 |
+
"max_body_offset_deg": 2.7234,
|
| 373 |
+
"actions_bit_identical": true,
|
| 374 |
+
"non_body_state_bit_identical": true,
|
| 375 |
+
"eval_items_deterministic": 8
|
| 376 |
+
},
|
| 377 |
+
"aug_seed": 0,
|
| 378 |
+
"layout": {
|
| 379 |
+
"nodes": 1,
|
| 380 |
+
"gpus": 1,
|
| 381 |
+
"per_gpu_batch": 512,
|
| 382 |
+
"global_batch": 512,
|
| 383 |
+
"gradient_accumulation": 1,
|
| 384 |
+
"num_workers": 32,
|
| 385 |
+
"prefetch": 2
|
| 386 |
+
},
|
| 387 |
+
"ema_schedule": "hb",
|
| 388 |
+
"inloop": {
|
| 389 |
+
"task": "a21",
|
| 390 |
+
"code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse",
|
| 391 |
+
"every": 250,
|
| 392 |
+
"exception": null
|
| 393 |
+
}
|
| 394 |
+
},
|
| 395 |
+
"stats": {
|
| 396 |
+
"state": {
|
| 397 |
+
"min": [
|
| 398 |
+
-2.2701830863952637,
|
| 399 |
+
-0.27317631244659424,
|
| 400 |
+
-0.29610729217529297,
|
| 401 |
+
0.10485819727182388,
|
| 402 |
+
-0.81209796667099,
|
| 403 |
+
-0.21175283193588257,
|
| 404 |
+
-2.262223958969116,
|
| 405 |
+
-0.46441030502319336,
|
| 406 |
+
-0.6099045872688293,
|
| 407 |
+
0.09954386949539185,
|
| 408 |
+
-0.7311134338378906,
|
| 409 |
+
-0.17378051578998566,
|
| 410 |
+
-0.1402929723262787,
|
| 411 |
+
-0.2614355683326721,
|
| 412 |
+
-0.046818941831588745,
|
| 413 |
+
-0.9373753666877747,
|
| 414 |
+
0.15214943885803223,
|
| 415 |
+
-1.0694174766540527,
|
| 416 |
+
0.18463465571403503,
|
| 417 |
+
-0.6166611313819885,
|
| 418 |
+
-0.4238741397857666,
|
| 419 |
+
-0.39084500074386597,
|
| 420 |
+
-1.7910548448562622,
|
| 421 |
+
-2.0524444580078125,
|
| 422 |
+
-0.4358607530593872,
|
| 423 |
+
-0.8722407817840576,
|
| 424 |
+
-1.8015098571777344,
|
| 425 |
+
-0.9958140850067139,
|
| 426 |
+
-0.7694652080535889,
|
| 427 |
+
0.9996309876441956,
|
| 428 |
+
0.9991293549537659,
|
| 429 |
+
0.9988874793052673,
|
| 430 |
+
0.9989415407180786,
|
| 431 |
+
0.9291336536407471,
|
| 432 |
+
0.9961293935775757,
|
| 433 |
+
0.3990069329738617,
|
| 434 |
+
0.3997034728527069,
|
| 435 |
+
0.39968419075012207,
|
| 436 |
+
0.40040892362594604,
|
| 437 |
+
0.5608876347541809,
|
| 438 |
+
0.0,
|
| 439 |
+
-0.1512877494096756,
|
| 440 |
+
-0.11685285717248917,
|
| 441 |
+
-1.0
|
| 442 |
+
],
|
| 443 |
+
"max": [
|
| 444 |
+
0.17076119780540466,
|
| 445 |
+
0.3236110508441925,
|
| 446 |
+
0.3831687271595001,
|
| 447 |
+
2.233388662338257,
|
| 448 |
+
0.19882787764072418,
|
| 449 |
+
0.17680993676185608,
|
| 450 |
+
0.1359129548072815,
|
| 451 |
+
0.10904774814844131,
|
| 452 |
+
0.27671802043914795,
|
| 453 |
+
2.1933090686798096,
|
| 454 |
+
0.1425849199295044,
|
| 455 |
+
0.21501344442367554,
|
| 456 |
+
0.22832152247428894,
|
| 457 |
+
0.2842406630516052,
|
| 458 |
+
0.5884646773338318,
|
| 459 |
+
0.3037309944629669,
|
| 460 |
+
0.7819540500640869,
|
| 461 |
+
0.04043177142739296,
|
| 462 |
+
1.388787031173706,
|
| 463 |
+
0.24945037066936493,
|
| 464 |
+
0.1306280493736267,
|
| 465 |
+
0.20737355947494507,
|
| 466 |
+
0.19802188873291016,
|
| 467 |
+
0.08976307511329651,
|
| 468 |
+
1.5246615409851074,
|
| 469 |
+
1.407419204711914,
|
| 470 |
+
0.8123467564582825,
|
| 471 |
+
1.1947879791259766,
|
| 472 |
+
1.6157052516937256,
|
| 473 |
+
1.0,
|
| 474 |
+
1.0,
|
| 475 |
+
1.0,
|
| 476 |
+
1.0,
|
| 477 |
+
1.0,
|
| 478 |
+
1.0,
|
| 479 |
+
1.0,
|
| 480 |
+
1.0,
|
| 481 |
+
1.0,
|
| 482 |
+
1.0,
|
| 483 |
+
1.0,
|
| 484 |
+
1.0,
|
| 485 |
+
0.639435887336731,
|
| 486 |
+
0.09351898729801178,
|
| 487 |
+
-0.7681906223297119
|
| 488 |
+
],
|
| 489 |
+
"mean": [
|
| 490 |
+
-0.7531668394892643,
|
| 491 |
+
0.08920568545369893,
|
| 492 |
+
0.07067044259490517,
|
| 493 |
+
0.7642513375470761,
|
| 494 |
+
-0.1636458593013806,
|
| 495 |
+
-0.023583596530965978,
|
| 496 |
+
-0.7028838506918503,
|
| 497 |
+
-0.13150115730668355,
|
| 498 |
+
-0.13060744123825166,
|
| 499 |
+
0.8397792745552163,
|
| 500 |
+
-0.29642171881210544,
|
| 501 |
+
0.023404424733916872,
|
| 502 |
+
0.03323390034310277,
|
| 503 |
+
0.005153534859300528,
|
| 504 |
+
0.12670043594070385,
|
| 505 |
+
-0.12135132512904276,
|
| 506 |
+
0.32688682632575744,
|
| 507 |
+
-0.34025291048965384,
|
| 508 |
+
1.0064546460331283,
|
| 509 |
+
-0.22132733376049174,
|
| 510 |
+
-0.09390540696381505,
|
| 511 |
+
0.0020294867516669796,
|
| 512 |
+
-0.9347671857865999,
|
| 513 |
+
-0.5446749532985431,
|
| 514 |
+
0.3699779073214432,
|
| 515 |
+
0.6207957483288243,
|
| 516 |
+
-0.7479217756695453,
|
| 517 |
+
0.12144748586150506,
|
| 518 |
+
0.12118187016003243,
|
| 519 |
+
0.9999840190987344,
|
| 520 |
+
0.9999818626109905,
|
| 521 |
+
0.9999802706920957,
|
| 522 |
+
0.9999796302992863,
|
| 523 |
+
0.997536483784903,
|
| 524 |
+
0.9997633830999401,
|
| 525 |
+
0.6985039807005555,
|
| 526 |
+
0.6984985546667931,
|
| 527 |
+
0.6985102459092983,
|
| 528 |
+
0.6989350363811875,
|
| 529 |
+
0.7882137827426893,
|
| 530 |
+
0.14730287148854837,
|
| 531 |
+
0.1697078753632969,
|
| 532 |
+
-0.014566843709871236,
|
| 533 |
+
-0.951296124115036
|
| 534 |
+
],
|
| 535 |
+
"std": [
|
| 536 |
+
0.8702993367372945,
|
| 537 |
+
0.06537943029111525,
|
| 538 |
+
0.07654780244438013,
|
| 539 |
+
0.7112500999676913,
|
| 540 |
+
0.145283198895165,
|
| 541 |
+
0.047866697406743985,
|
| 542 |
+
0.8545553679812813,
|
| 543 |
+
0.0720881483654181,
|
| 544 |
+
0.1478987551211821,
|
| 545 |
+
0.7925819593075105,
|
| 546 |
+
0.22834769005058556,
|
| 547 |
+
0.050678510432579586,
|
| 548 |
+
0.046478733386081675,
|
| 549 |
+
0.03356911096437694,
|
| 550 |
+
0.1052938605753584,
|
| 551 |
+
0.3001636421580595,
|
| 552 |
+
0.08770922543021444,
|
| 553 |
+
0.22980924646231987,
|
| 554 |
+
0.19216837631975336,
|
| 555 |
+
0.11281399341997446,
|
| 556 |
+
0.12302227799457731,
|
| 557 |
+
0.06405779462644502,
|
| 558 |
+
0.4714357774335524,
|
| 559 |
+
0.24364128399266738,
|
| 560 |
+
0.2753097937162136,
|
| 561 |
+
0.4954273787478825,
|
| 562 |
+
0.4550380536420718,
|
| 563 |
+
0.17488023028147637,
|
| 564 |
+
0.4290372100442338,
|
| 565 |
+
1.8502286312077823e-05,
|
| 566 |
+
2.8853457272592953e-05,
|
| 567 |
+
3.9121279481955076e-05,
|
| 568 |
+
3.6852514097164415e-05,
|
| 569 |
+
0.0025758735618069276,
|
| 570 |
+
0.00013232718803578354,
|
| 571 |
+
0.29804922992520444,
|
| 572 |
+
0.2979910347481662,
|
| 573 |
+
0.297951069217773,
|
| 574 |
+
0.29750204841817435,
|
| 575 |
+
0.20818212208894177,
|
| 576 |
+
0.34110249080644384,
|
| 577 |
+
0.24458060944891366,
|
| 578 |
+
0.02926279635978709,
|
| 579 |
+
0.07312142435045
|
| 580 |
+
]
|
| 581 |
+
},
|
| 582 |
+
"action": {
|
| 583 |
+
"min": [
|
| 584 |
+
-0.25,
|
| 585 |
+
-0.625,
|
| 586 |
+
-0.5625,
|
| 587 |
+
-0.3125,
|
| 588 |
+
-0.5625,
|
| 589 |
+
-0.5625,
|
| 590 |
+
-0.375,
|
| 591 |
+
-0.75,
|
| 592 |
+
-0.625,
|
| 593 |
+
-0.1875,
|
| 594 |
+
-0.75,
|
| 595 |
+
-0.3125,
|
| 596 |
+
-0.4375,
|
| 597 |
+
-0.375,
|
| 598 |
+
-0.6875,
|
| 599 |
+
-0.5625,
|
| 600 |
+
-0.625,
|
| 601 |
+
-0.375,
|
| 602 |
+
-0.5625,
|
| 603 |
+
-0.4375,
|
| 604 |
+
-0.375,
|
| 605 |
+
-0.5,
|
| 606 |
+
-0.4375,
|
| 607 |
+
-0.4375,
|
| 608 |
+
-0.5625,
|
| 609 |
+
0.0625,
|
| 610 |
+
-0.4375,
|
| 611 |
+
-0.4375,
|
| 612 |
+
-0.375,
|
| 613 |
+
-0.4375,
|
| 614 |
+
-0.0625,
|
| 615 |
+
-0.25,
|
| 616 |
+
-0.3125,
|
| 617 |
+
-0.4375,
|
| 618 |
+
-0.4375,
|
| 619 |
+
-0.625,
|
| 620 |
+
-0.25,
|
| 621 |
+
-0.8125,
|
| 622 |
+
-0.3125,
|
| 623 |
+
-0.1875,
|
| 624 |
+
-0.4375,
|
| 625 |
+
-0.5,
|
| 626 |
+
-0.3125,
|
| 627 |
+
0.0,
|
| 628 |
+
-0.625,
|
| 629 |
+
-0.3125,
|
| 630 |
+
-0.6875,
|
| 631 |
+
-0.375,
|
| 632 |
+
-0.125,
|
| 633 |
+
-0.625,
|
| 634 |
+
-0.375,
|
| 635 |
+
-0.8125,
|
| 636 |
+
-0.4375,
|
| 637 |
+
-0.625,
|
| 638 |
+
-0.3125,
|
| 639 |
+
-0.4375,
|
| 640 |
+
-0.4375,
|
| 641 |
+
-0.75,
|
| 642 |
+
-0.625,
|
| 643 |
+
-0.375,
|
| 644 |
+
-0.625,
|
| 645 |
+
-0.4375,
|
| 646 |
+
-0.4375,
|
| 647 |
+
-0.3125,
|
| 648 |
+
0.9996309876441956,
|
| 649 |
+
0.9991293549537659,
|
| 650 |
+
0.9988874793052673,
|
| 651 |
+
0.9989415407180786,
|
| 652 |
+
0.9291336536407471,
|
| 653 |
+
0.9961293935775757,
|
| 654 |
+
0.3990069329738617,
|
| 655 |
+
0.3997034728527069,
|
| 656 |
+
0.39968419075012207,
|
| 657 |
+
0.40040892362594604,
|
| 658 |
+
0.5608876347541809,
|
| 659 |
+
0.0
|
| 660 |
+
],
|
| 661 |
+
"max": [
|
| 662 |
+
0.5,
|
| 663 |
+
0.3125,
|
| 664 |
+
0.5,
|
| 665 |
+
0.4375,
|
| 666 |
+
0.25,
|
| 667 |
+
0.25,
|
| 668 |
+
0.3125,
|
| 669 |
+
0.1875,
|
| 670 |
+
0.375,
|
| 671 |
+
0.375,
|
| 672 |
+
0.125,
|
| 673 |
+
0.375,
|
| 674 |
+
0.4375,
|
| 675 |
+
0.4375,
|
| 676 |
+
0.3125,
|
| 677 |
+
0.25,
|
| 678 |
+
0.4375,
|
| 679 |
+
0.5625,
|
| 680 |
+
0.125,
|
| 681 |
+
0.5625,
|
| 682 |
+
0.1875,
|
| 683 |
+
0.125,
|
| 684 |
+
0.5,
|
| 685 |
+
0.375,
|
| 686 |
+
0.0625,
|
| 687 |
+
0.5625,
|
| 688 |
+
0.1875,
|
| 689 |
+
0.25,
|
| 690 |
+
0.3125,
|
| 691 |
+
0.25,
|
| 692 |
+
0.6875,
|
| 693 |
+
0.4375,
|
| 694 |
+
0.3125,
|
| 695 |
+
0.4375,
|
| 696 |
+
0.5,
|
| 697 |
+
0.25,
|
| 698 |
+
0.625,
|
| 699 |
+
0.125,
|
| 700 |
+
0.375,
|
| 701 |
+
0.5625,
|
| 702 |
+
0.1875,
|
| 703 |
+
0.375,
|
| 704 |
+
0.25,
|
| 705 |
+
0.5,
|
| 706 |
+
0.1875,
|
| 707 |
+
0.5,
|
| 708 |
+
0.4375,
|
| 709 |
+
0.3125,
|
| 710 |
+
0.5625,
|
| 711 |
+
0.25,
|
| 712 |
+
0.375,
|
| 713 |
+
0.375,
|
| 714 |
+
0.6875,
|
| 715 |
+
0.1875,
|
| 716 |
+
0.5,
|
| 717 |
+
0.625,
|
| 718 |
+
0.5,
|
| 719 |
+
0.375,
|
| 720 |
+
0.375,
|
| 721 |
+
0.5,
|
| 722 |
+
0.125,
|
| 723 |
+
0.625,
|
| 724 |
+
0.4375,
|
| 725 |
+
0.6875,
|
| 726 |
+
1.0,
|
| 727 |
+
1.0,
|
| 728 |
+
1.0,
|
| 729 |
+
1.0,
|
| 730 |
+
1.0,
|
| 731 |
+
1.0,
|
| 732 |
+
1.0,
|
| 733 |
+
1.0,
|
| 734 |
+
1.0,
|
| 735 |
+
1.0,
|
| 736 |
+
1.0,
|
| 737 |
+
1.0
|
| 738 |
+
],
|
| 739 |
+
"mean": [
|
| 740 |
+
0.20233245104145042,
|
| 741 |
+
-0.15635379904504879,
|
| 742 |
+
0.1067746176735174,
|
| 743 |
+
0.1295577872350241,
|
| 744 |
+
-0.15413581528383272,
|
| 745 |
+
-0.24018450280257422,
|
| 746 |
+
0.04108495951837243,
|
| 747 |
+
-0.22379362443198855,
|
| 748 |
+
-0.09086380988628238,
|
| 749 |
+
0.051021555601688466,
|
| 750 |
+
-0.3685197679514682,
|
| 751 |
+
0.08125518995225244,
|
| 752 |
+
-0.03551801490092958,
|
| 753 |
+
-0.014731535303208544,
|
| 754 |
+
-0.19714538209581806,
|
| 755 |
+
-0.213527610545983,
|
| 756 |
+
-0.00988757986759855,
|
| 757 |
+
0.08513684174105599,
|
| 758 |
+
-0.22502335478513597,
|
| 759 |
+
0.07740020875141282,
|
| 760 |
+
-0.1662010126173506,
|
| 761 |
+
-0.24570747699121168,
|
| 762 |
+
-0.06387389569349296,
|
| 763 |
+
-0.050509768643461815,
|
| 764 |
+
-0.1940551980255115,
|
| 765 |
+
0.34620225243927755,
|
| 766 |
+
-0.19457203077065024,
|
| 767 |
+
-0.17379996770696376,
|
| 768 |
+
0.0011360228819228197,
|
| 769 |
+
-0.08769433487878578,
|
| 770 |
+
0.3568322838096556,
|
| 771 |
+
0.1458167543191936,
|
| 772 |
+
-0.02182663252831407,
|
| 773 |
+
0.06301971605194566,
|
| 774 |
+
0.0789910732821258,
|
| 775 |
+
-0.3288296081009388,
|
| 776 |
+
0.1761289587802459,
|
| 777 |
+
-0.35309407653449587,
|
| 778 |
+
-0.05148288469079418,
|
| 779 |
+
0.18985494083454432,
|
| 780 |
+
-0.09348833990727286,
|
| 781 |
+
-0.12202947316218024,
|
| 782 |
+
-0.10901494706248703,
|
| 783 |
+
0.26305272991488476,
|
| 784 |
+
-0.22518193665951605,
|
| 785 |
+
-0.027526930085576547,
|
| 786 |
+
-0.16906990289022675,
|
| 787 |
+
-0.015603735612299033,
|
| 788 |
+
0.20928987036652597,
|
| 789 |
+
-0.2469970359606025,
|
| 790 |
+
-0.03280698567573178,
|
| 791 |
+
-0.1797648086637603,
|
| 792 |
+
0.3433283163794893,
|
| 793 |
+
-0.20959910502156714,
|
| 794 |
+
0.04331375568011441,
|
| 795 |
+
0.2624104733236454,
|
| 796 |
+
-0.12965365718635388,
|
| 797 |
+
-0.10195733282587134,
|
| 798 |
+
-0.3011585126750167,
|
| 799 |
+
0.17579233271053907,
|
| 800 |
+
-0.25617388070029756,
|
| 801 |
+
0.17960766844278367,
|
| 802 |
+
0.12395984706940696,
|
| 803 |
+
0.2832128111088045,
|
| 804 |
+
0.9999840190987344,
|
| 805 |
+
0.9999818626109905,
|
| 806 |
+
0.9999802706920957,
|
| 807 |
+
0.9999796302992863,
|
| 808 |
+
0.997536483784903,
|
| 809 |
+
0.9997633830999401,
|
| 810 |
+
0.6985039807005555,
|
| 811 |
+
0.6984985546667931,
|
| 812 |
+
0.6985102459092983,
|
| 813 |
+
0.6989350363811875,
|
| 814 |
+
0.7882137827426893,
|
| 815 |
+
0.14730287148854837
|
| 816 |
+
],
|
| 817 |
+
"std": [
|
| 818 |
+
0.14387889849464017,
|
| 819 |
+
0.22002725850755592,
|
| 820 |
+
0.17023058244057782,
|
| 821 |
+
0.12799376567512302,
|
| 822 |
+
0.14669566547477705,
|
| 823 |
+
0.17137918871048685,
|
| 824 |
+
0.10837036550509957,
|
| 825 |
+
0.24967630650194603,
|
| 826 |
+
0.3167673937030814,
|
| 827 |
+
0.13791457708463964,
|
| 828 |
+
0.1558879249225253,
|
| 829 |
+
0.10944088727655074,
|
| 830 |
+
0.21023136387156308,
|
| 831 |
+
0.13129675029615331,
|
| 832 |
+
0.2763938721515471,
|
| 833 |
+
0.14623609832182455,
|
| 834 |
+
0.35032697342667946,
|
| 835 |
+
0.14687161314161287,
|
| 836 |
+
0.09447772092749067,
|
| 837 |
+
0.28749075482259157,
|
| 838 |
+
0.10602082258665294,
|
| 839 |
+
0.13892427833485307,
|
| 840 |
+
0.16994943275056978,
|
| 841 |
+
0.1442771380532549,
|
| 842 |
+
0.0977608285517821,
|
| 843 |
+
0.08765465031102393,
|
| 844 |
+
0.14403055417943056,
|
| 845 |
+
0.1492474485468382,
|
| 846 |
+
0.13164447070933707,
|
| 847 |
+
0.1500123078688166,
|
| 848 |
+
0.17029337028108626,
|
| 849 |
+
0.11127976794851127,
|
| 850 |
+
0.09071197151363286,
|
| 851 |
+
0.22299894138544968,
|
| 852 |
+
0.30077203584339085,
|
| 853 |
+
0.19527291668407834,
|
| 854 |
+
0.15449669204830557,
|
| 855 |
+
0.2616432744537317,
|
| 856 |
+
0.10971484752905038,
|
| 857 |
+
0.2031555804379325,
|
| 858 |
+
0.15751704689763124,
|
| 859 |
+
0.20958523064765439,
|
| 860 |
+
0.07314237295780124,
|
| 861 |
+
0.10866238282425084,
|
| 862 |
+
0.20908864030616714,
|
| 863 |
+
0.22004042023819897,
|
| 864 |
+
0.2893527840649329,
|
| 865 |
+
0.13174662906263046,
|
| 866 |
+
0.10049584022270718,
|
| 867 |
+
0.19328266323665458,
|
| 868 |
+
0.09645590365939917,
|
| 869 |
+
0.3613390428120311,
|
| 870 |
+
0.28011666359209003,
|
| 871 |
+
0.18888580642737607,
|
| 872 |
+
0.25113400201108055,
|
| 873 |
+
0.2307348262267991,
|
| 874 |
+
0.25063238299275425,
|
| 875 |
+
0.42747866380539706,
|
| 876 |
+
0.20811619893271996,
|
| 877 |
+
0.15748165255971092,
|
| 878 |
+
0.11924260634895344,
|
| 879 |
+
0.27838897468038204,
|
| 880 |
+
0.14163213034462338,
|
| 881 |
+
0.25291184983402537,
|
| 882 |
+
1.8502286312077823e-05,
|
| 883 |
+
2.8853457272592953e-05,
|
| 884 |
+
3.9121279481955076e-05,
|
| 885 |
+
3.6852514097164415e-05,
|
| 886 |
+
0.0025758735618069276,
|
| 887 |
+
0.00013232718803578354,
|
| 888 |
+
0.29804922992520444,
|
| 889 |
+
0.2979910347481662,
|
| 890 |
+
0.297951069217773,
|
| 891 |
+
0.29750204841817435,
|
| 892 |
+
0.20818212208894177,
|
| 893 |
+
0.34110249080644384
|
| 894 |
+
]
|
| 895 |
+
}
|
| 896 |
+
},
|
| 897 |
+
"code_commit": "2c91a514d65897635ae769a3e00d318a9be385cb",
|
| 898 |
+
"step": 4000,
|
| 899 |
+
"weights": "ema",
|
| 900 |
+
"offline_eval": {
|
| 901 |
+
"mse": 0.004579942673444748,
|
| 902 |
+
"mse_row0": 0.005206524860113859,
|
| 903 |
+
"mse_motion_token": 0.004571415483951569,
|
| 904 |
+
"mse_inspire_left_hand_state": 0.0025285666342824697,
|
| 905 |
+
"mse_inspire_right_hand_state": 0.006722284946590662,
|
| 906 |
+
"samples": 256,
|
| 907 |
+
"frames": "train"
|
| 908 |
+
},
|
| 909 |
+
"format": "hb_baselines/1"
|
| 910 |
+
}
|
a21-floor-basket-transfer/b512/step-004000/model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14329a96d2fd00a317e6f53484e805d34cbe120687e34c919ea548a381da0e13
|
| 3 |
+
size 336138027
|
a21-floor-basket-transfer/b512/step-004000/protocol.json
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"format": "hb_baselines/1",
|
| 3 |
+
"step": 4000,
|
| 4 |
+
"policy": "act",
|
| 5 |
+
"files": {
|
| 6 |
+
"config.json": {
|
| 7 |
+
"bytes": 15781,
|
| 8 |
+
"sha256": "dffda0de03c96d5670e71e01255a1f4c0110e58a6c529988e99516fc8792fa14"
|
| 9 |
+
},
|
| 10 |
+
"model.pt": {
|
| 11 |
+
"bytes": 336138027,
|
| 12 |
+
"sha256": "14329a96d2fd00a317e6f53484e805d34cbe120687e34c919ea548a381da0e13"
|
| 13 |
+
},
|
| 14 |
+
"training_records/code_2c91a514/evaluation/augmentation/hb_aug_v2.py": {
|
| 15 |
+
"bytes": 7475,
|
| 16 |
+
"sha256": "9f7713cea4f846efcfc924234267ced48210357f419d67915c10b504316bedde"
|
| 17 |
+
},
|
| 18 |
+
"training_records/code_2c91a514/evaluation/baselines/__init__.py": {
|
| 19 |
+
"bytes": 947,
|
| 20 |
+
"sha256": "47706f0d012b81a58da0742e82395a9a125cd56b7c99ffff7a9809bc43a517a3"
|
| 21 |
+
},
|
| 22 |
+
"training_records/code_2c91a514/evaluation/baselines/act_nets.py": {
|
| 23 |
+
"bytes": 22435,
|
| 24 |
+
"sha256": "3db95cd8e4e436875e11f1054a99d250ca7d94e0127909090b58730402340f19"
|
| 25 |
+
},
|
| 26 |
+
"training_records/code_2c91a514/evaluation/baselines/adapters.py": {
|
| 27 |
+
"bytes": 3479,
|
| 28 |
+
"sha256": "87e47332381fcb34e75d08cb258475c200519cb5cf17fd0e218bf2a1b21fa890"
|
| 29 |
+
},
|
| 30 |
+
"training_records/code_2c91a514/evaluation/baselines/check_flash_adapter.py": {
|
| 31 |
+
"bytes": 6003,
|
| 32 |
+
"sha256": "aa7fc175f50de83b130427cc30533a45220e70d0ed8c807f33ca44d39cb9fb81"
|
| 33 |
+
},
|
| 34 |
+
"training_records/code_2c91a514/evaluation/baselines/check_flash_parity.py": {
|
| 35 |
+
"bytes": 7900,
|
| 36 |
+
"sha256": "91f714aa3b7ec6b5c28764496163671cadabe4a833c0b06b6bc4c155cec7f66f"
|
| 37 |
+
},
|
| 38 |
+
"training_records/code_2c91a514/evaluation/baselines/data.py": {
|
| 39 |
+
"bytes": 20849,
|
| 40 |
+
"sha256": "8317d72b683440bc8ac2b37e4be8b9c1783ae1731d3786a10f6c17039202e809"
|
| 41 |
+
},
|
| 42 |
+
"training_records/code_2c91a514/evaluation/baselines/flash.py": {
|
| 43 |
+
"bytes": 24032,
|
| 44 |
+
"sha256": "35c01a4e2edd80f85878b37928069c09ed3238127bbb51a5443e7f1c92703e53"
|
| 45 |
+
},
|
| 46 |
+
"training_records/code_2c91a514/evaluation/baselines/inloop.py": {
|
| 47 |
+
"bytes": 6993,
|
| 48 |
+
"sha256": "0e6343d7d28893c4107864b943193eb4a402cf97b1625e94eb2acb1d163ca85c"
|
| 49 |
+
},
|
| 50 |
+
"training_records/code_2c91a514/evaluation/baselines/nets.py": {
|
| 51 |
+
"bytes": 10478,
|
| 52 |
+
"sha256": "2d72e3c455d5e376a6f5954886fd4c7a6478eb516380c6a05515fa043c62fbce"
|
| 53 |
+
},
|
| 54 |
+
"training_records/code_2c91a514/evaluation/baselines/ode_nets.py": {
|
| 55 |
+
"bytes": 9148,
|
| 56 |
+
"sha256": "38f2ea6050fa45e6c0d5e3f19caf21f1a72a50f80e356044dddcf76da22b144a"
|
| 57 |
+
},
|
| 58 |
+
"training_records/code_2c91a514/evaluation/baselines/policies.py": {
|
| 59 |
+
"bytes": 25238,
|
| 60 |
+
"sha256": "a890fc3ce8274812aaea3ed9ad57a35f9cedeb60d05c33d19cf79942dd4724ca"
|
| 61 |
+
},
|
| 62 |
+
"training_records/code_2c91a514/evaluation/baselines/requirements.txt": {
|
| 63 |
+
"bytes": 485,
|
| 64 |
+
"sha256": "bb211f66038e53efd08ee3ec03e133d8bb206ec36cc608d349b4fad3a61e874b"
|
| 65 |
+
},
|
| 66 |
+
"training_records/code_2c91a514/evaluation/baselines/runtime.py": {
|
| 67 |
+
"bytes": 9925,
|
| 68 |
+
"sha256": "7c768f4895e9c24f403e2f942ee22218cfe61b785d1ce6ef7947205a0a17e115"
|
| 69 |
+
},
|
| 70 |
+
"training_records/code_2c91a514/evaluation/baselines/train.py": {
|
| 71 |
+
"bytes": 34683,
|
| 72 |
+
"sha256": "e827afa457186cf64419d337b8c9591afbf6b2eb32dceb5a9f3d9856aa4a38f3"
|
| 73 |
+
},
|
| 74 |
+
"training_records/code_2c91a514/evaluation/policy/ACT/model.py": {
|
| 75 |
+
"bytes": 573,
|
| 76 |
+
"sha256": "593889e0403303d97820d46a6808aed24a3f2cc950dc11310fa305136fbd27c1"
|
| 77 |
+
},
|
| 78 |
+
"training_records/code_commit.txt": {
|
| 79 |
+
"bytes": 41,
|
| 80 |
+
"sha256": "2b7768565ccd4d6384b3609387fb974b6154a792c96e29a09bfd396c55e7e060"
|
| 81 |
+
},
|
| 82 |
+
"training_records/inloop-mse.jsonl": {
|
| 83 |
+
"bytes": 26332,
|
| 84 |
+
"sha256": "5e4fad280630807909582b1c9913015111364d9b80819baf605515bf4699da78"
|
| 85 |
+
},
|
| 86 |
+
"training_records/pip_freeze_hb-baselines.txt": {
|
| 87 |
+
"bytes": 1185,
|
| 88 |
+
"sha256": "72942d6f1c95ab99ba51fcf641bfd0e4cb34943c5b19a2a39d8da72ef5daa6b2"
|
| 89 |
+
},
|
| 90 |
+
"training_records/run.json": {
|
| 91 |
+
"bytes": 16361,
|
| 92 |
+
"sha256": "06db5fb4571421f778191f821a23641efa008f3809d7f7a7b22dd7f1cffc8b4f"
|
| 93 |
+
},
|
| 94 |
+
"training_records/train.log": {
|
| 95 |
+
"bytes": 23496,
|
| 96 |
+
"sha256": "0971c01fafda822a3239fc060387365ed895c921e93f5df5b9c76b9a78448f5d"
|
| 97 |
+
},
|
| 98 |
+
"training_records/train_log.jsonl": {
|
| 99 |
+
"bytes": 19906,
|
| 100 |
+
"sha256": "e13cae2317654a1d7b6e739d648f1bfc9b4c775df7e48256331dd4b054d9cf02"
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"task_dir": "a21-floor-basket-transfer",
|
| 104 |
+
"training_data": "humanoid-benchmark/a21-floor-transfer-basket-trim-raw-head-expert-v1 @682f2bfc (30 Hz), all 100 episodes; cameras ego_view + chest",
|
| 105 |
+
"episodes": 100,
|
| 106 |
+
"frames": 86706,
|
| 107 |
+
"steps": 4000,
|
| 108 |
+
"global_batch": 512,
|
| 109 |
+
"per_gpu_batch": 512,
|
| 110 |
+
"num_gpus": 1,
|
| 111 |
+
"gradient_accumulation_steps": 1,
|
| 112 |
+
"save_steps": [
|
| 113 |
+
2000,
|
| 114 |
+
4000
|
| 115 |
+
],
|
| 116 |
+
"lr": 0.0001,
|
| 117 |
+
"lr_schedule": "linear warm-up + cosine after a 200-step linear warm-up",
|
| 118 |
+
"ema": 0.9999,
|
| 119 |
+
"augmentation": "Humanoid Benchmark online augmentation spec v2 (hb-aug-v2-20261109): 15 visual effects, one per sample at 1.5x; proprio per-joint bias U(+-2 deg) + N(0, 0.25 deg); no delay, no history drop; model-native image augmentation off",
|
| 120 |
+
"state_dim": 44,
|
| 121 |
+
"action_dim": 76,
|
| 122 |
+
"cameras": [
|
| 123 |
+
"ego_view",
|
| 124 |
+
"chest"
|
| 125 |
+
],
|
| 126 |
+
"contract": "g1_sonic_dfx6",
|
| 127 |
+
"image_hw": [
|
| 128 |
+
168,
|
| 129 |
+
224
|
| 130 |
+
],
|
| 131 |
+
"task_text": "Grasp the basket handle with the right hand from the floor, stand up while retaining it, carry it to the long desk, then place and release it on the tabletop.",
|
| 132 |
+
"inloop_mse": {
|
| 133 |
+
"task": "a21",
|
| 134 |
+
"split": "train10",
|
| 135 |
+
"every": 250,
|
| 136 |
+
"seed": 1234,
|
| 137 |
+
"weights": "ema",
|
| 138 |
+
"nmse_at_this_step": 0.0288,
|
| 139 |
+
"curve": {
|
| 140 |
+
"250": 0.1224,
|
| 141 |
+
"500": 0.0785,
|
| 142 |
+
"750": 0.0654,
|
| 143 |
+
"1000": 0.0536,
|
| 144 |
+
"1250": 0.0446,
|
| 145 |
+
"1500": 0.0401,
|
| 146 |
+
"1750": 0.0372,
|
| 147 |
+
"2000": 0.0353,
|
| 148 |
+
"2250": 0.0338,
|
| 149 |
+
"2500": 0.0326,
|
| 150 |
+
"2750": 0.0314,
|
| 151 |
+
"3000": 0.0304,
|
| 152 |
+
"3250": 0.0298,
|
| 153 |
+
"3500": 0.0293,
|
| 154 |
+
"3750": 0.029,
|
| 155 |
+
"4000": 0.0288
|
| 156 |
+
}
|
| 157 |
+
},
|
| 158 |
+
"seed": 0,
|
| 159 |
+
"reproducibility": {
|
| 160 |
+
"protocol": "https://github.com/zuo-kuangji/HumanWAM/blob/bai/hb_training/REPRODUCIBILITY.md",
|
| 161 |
+
"protocol_commit": "6814d6c",
|
| 162 |
+
"training_seed": 0,
|
| 163 |
+
"training_seed_source": "hb_baselines DEFAULTS seed 0 (= the published act b512* folders)",
|
| 164 |
+
"training_seed_verified_from_run_files": true,
|
| 165 |
+
"augmentation_random_stream": "seeded: numpy default_rng([HB_AUG_SEED=0, torch.initial_seed(), worker id])",
|
| 166 |
+
"inloop_mse_seed": 1234,
|
| 167 |
+
"layout": {
|
| 168 |
+
"nodes": 1,
|
| 169 |
+
"gpus_per_node": 1,
|
| 170 |
+
"per_gpu_batch": 512,
|
| 171 |
+
"global_batch": 512,
|
| 172 |
+
"gradient_accumulation": 1,
|
| 173 |
+
"num_workers": 32,
|
| 174 |
+
"prefetch": 2
|
| 175 |
+
},
|
| 176 |
+
"environment": "hb-baselines (evaluation/baselines/requirements.txt: Python 3.12.1, torch 2.9.0+cu128, torchvision 0.24.0); training_records/pip_freeze_hb-baselines.txt",
|
| 177 |
+
"hardware": "Alibaba Cloud PAI DLC A800 cluster (dlc19te5fv9wtn5t / dlc1plp7nvyo11cd), 1 x NVIDIA A800 80 GB",
|
| 178 |
+
"upstream_code": "github.com/zuo-kuangji/Humanoid_benchmark bai @ 2c91a514d65897635ae769a3e00d318a9be385cb (evaluation/baselines/train.py --policy act --contract g1_sonic_dfx6)",
|
| 179 |
+
"determinism": "statistical reproducibility: same data commit, config, seed and layout give the same curves within run-to-run noise; GPU kernels are not bitwise deterministic",
|
| 180 |
+
"exceptions": []
|
| 181 |
+
},
|
| 182 |
+
"inference": "Humanoid_benchmark evaluation/policy/ACT (evaluation/baselines/adapters.py, runtime.BaselinePolicy) loads this folder (config.json + model.pt); training_records/code_* in the last checkpoint is the exact code",
|
| 183 |
+
"resume_state_included": false
|
| 184 |
+
}
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/augmentation/hb_aug_v2.py
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Humanoid Benchmark data augmentation v2 (project CLAUDE.md), model-agnostic torch implementation.
|
| 2 |
+
|
| 3 |
+
augment(x, rng, obs_mask=None) takes x: float [T, V, 3, H, W] in [0, 1] (T frames, V cameras) and returns the
|
| 4 |
+
augmented tensor. Each call is one training sample: one of the 15 effects is chosen uniformly and its magnitude
|
| 5 |
+
is scaled by 1.5 around identity; the rest stay at x1. Colour is shared across cameras and time; geometry, light
|
| 6 |
+
patches and white balance are drawn per camera and fixed over time; sensor/optics effects (noise, gaussian blur,
|
| 7 |
+
JPEG, motion blur, sharpen, defocus) apply only to observation frames (obs_mask True).
|
| 8 |
+
Pixel-size parameters are defined at 224 px and scaled by H / 224.
|
| 9 |
+
perturb_joints(q, rng) applies the proprio spec: per-joint bias +-2 deg plus N(0, 0.25 deg) clipped at 3 sigma.
|
| 10 |
+
"""
|
| 11 |
+
import io
|
| 12 |
+
import math
|
| 13 |
+
|
| 14 |
+
import numpy as np
|
| 15 |
+
import torch
|
| 16 |
+
import torch.nn.functional as F
|
| 17 |
+
from PIL import Image
|
| 18 |
+
from torchvision.transforms import InterpolationMode
|
| 19 |
+
from torchvision.transforms import functional as TF
|
| 20 |
+
|
| 21 |
+
EFFECTS = ("exposure", "contrast", "saturation", "hue", "gamma", "temperature", "rotation_crop", "noise",
|
| 22 |
+
"gaussian_blur", "jpeg", "motion_blur", "sharpen", "defocus", "light_shadow", "wb_channel")
|
| 23 |
+
CENTER = {"exposure": 0.0, "contrast": 1.0, "saturation": 1.0, "hue": 0.0, "gamma": 1.0, "temperature": 0.0}
|
| 24 |
+
RANGE = {"exposure": (-0.22, 0.22), "contrast": (0.88, 1.12), "saturation": (0.76, 1.24), "hue": (-0.015, 0.015),
|
| 25 |
+
"gamma": (0.89, 1.11), "temperature": (-0.066, 0.066)}
|
| 26 |
+
VERSION = "hb-aug-v2-20261109"
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def sample(rng, views, height):
|
| 30 |
+
boost = EFFECTS[int(rng.integers(len(EFFECTS)))]
|
| 31 |
+
|
| 32 |
+
def k(name):
|
| 33 |
+
return 1.5 if boost == name else 1.0
|
| 34 |
+
|
| 35 |
+
px = height / 224.0
|
| 36 |
+
p = {"boost": boost}
|
| 37 |
+
for name, (a, b) in RANGE.items():
|
| 38 |
+
c = CENTER[name]
|
| 39 |
+
p[name] = float(rng.uniform(c + k(name) * (a - c), c + k(name) * (b - c)))
|
| 40 |
+
p["geometry"] = []
|
| 41 |
+
for _ in range(views):
|
| 42 |
+
angle = float(rng.uniform(-1.5 * k("rotation_crop"), 1.5 * k("rotation_crop")))
|
| 43 |
+
p["geometry"].append((angle, 1.0 + abs(angle) * 0.015 + float(rng.uniform(0, 0.02 * k("rotation_crop")))))
|
| 44 |
+
p["noise"] = 4.0 / 255.0 * k("noise") if rng.random() < 0.5 else 0.0
|
| 45 |
+
p["gaussian_blur"] = float(rng.uniform(0.25, 0.65)) * k("gaussian_blur") if rng.random() < 0.15 else 0.0
|
| 46 |
+
if rng.random() < 0.35:
|
| 47 |
+
lo = int(round(100 - k("jpeg") * 30))
|
| 48 |
+
hi = int(round(100 - k("jpeg") * 5))
|
| 49 |
+
p["jpeg"] = int(rng.integers(lo, hi + 1))
|
| 50 |
+
else:
|
| 51 |
+
p["jpeg"] = None
|
| 52 |
+
p["motion_blur"] = ((float(rng.uniform(3, 7)) * k("motion_blur") * px, float(rng.uniform(0, 180)))
|
| 53 |
+
if rng.random() < 0.15 else None)
|
| 54 |
+
p["sharpen"] = float(rng.uniform(0.2, 0.6)) * k("sharpen") if rng.random() < 0.15 else 0.0
|
| 55 |
+
p["defocus"] = float(rng.uniform(1, 2)) * k("defocus") * px if rng.random() < 0.10 else 0.0
|
| 56 |
+
if rng.random() < 0.30:
|
| 57 |
+
g = 0.30 * k("light_shadow")
|
| 58 |
+
p["light_shadow"] = [[(float(rng.uniform(0.1, 0.9)), float(rng.uniform(0.1, 0.9)),
|
| 59 |
+
float(rng.uniform(0.15, 0.35)), float(rng.uniform(1 - g, 1 + g)))
|
| 60 |
+
for _ in range(int(rng.integers(1, 3)))] for _ in range(views)]
|
| 61 |
+
else:
|
| 62 |
+
p["light_shadow"] = None
|
| 63 |
+
if rng.random() < 0.30:
|
| 64 |
+
g = 0.10 * k("wb_channel")
|
| 65 |
+
gains = []
|
| 66 |
+
for _ in range(views):
|
| 67 |
+
row = [1.0, 1.0, 1.0]
|
| 68 |
+
row[int(rng.integers(0, 3))] = float(rng.uniform(1 - g, 1 + g))
|
| 69 |
+
gains.append(row)
|
| 70 |
+
p["wb_channel"] = gains
|
| 71 |
+
else:
|
| 72 |
+
p["wb_channel"] = None
|
| 73 |
+
return p
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def _conv(x, kernel):
|
| 77 |
+
n, c, h, w = x.shape
|
| 78 |
+
k = kernel.to(x)[None, None].repeat(c, 1, 1, 1)
|
| 79 |
+
pad = kernel.shape[-1] // 2
|
| 80 |
+
return F.conv2d(F.pad(x, (pad, pad, pad, pad), mode="reflect"), k, groups=c)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def motion_kernel(length, angle_deg):
|
| 84 |
+
size = max(3, int(round(length)) | 1)
|
| 85 |
+
k = torch.zeros(size, size)
|
| 86 |
+
c = size // 2
|
| 87 |
+
th = math.radians(angle_deg)
|
| 88 |
+
for s in np.linspace(-(length - 1) / 2, (length - 1) / 2, 8 * size):
|
| 89 |
+
k[int(round(c - s * math.sin(th))), int(round(c + s * math.cos(th)))] = 1.0
|
| 90 |
+
return k / k.sum()
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def disk_kernel(r):
|
| 94 |
+
size = 2 * int(math.ceil(r)) + 1
|
| 95 |
+
c = size // 2
|
| 96 |
+
yy, xx = torch.meshgrid(torch.arange(size), torch.arange(size), indexing="ij")
|
| 97 |
+
k = (((yy - c) ** 2 + (xx - c) ** 2) <= (r + 0.5) ** 2).float()
|
| 98 |
+
return k / k.sum()
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
def apply(x, p, obs_mask=None, noise_seed=0):
|
| 102 |
+
t, v, c, h, w = x.shape
|
| 103 |
+
x = x.clone().clamp(0, 1)
|
| 104 |
+
for vi, (angle, scale) in enumerate(p["geometry"]):
|
| 105 |
+
x[:, vi] = TF.affine(x[:, vi], angle=angle, translate=[0, 0], scale=scale, shear=[0, 0],
|
| 106 |
+
interpolation=InterpolationMode.BILINEAR)
|
| 107 |
+
if p["light_shadow"] is not None:
|
| 108 |
+
yy, xx = torch.meshgrid(torch.linspace(0, 1, h), torch.linspace(0, 1, w), indexing="ij")
|
| 109 |
+
for vi, blobs in enumerate(p["light_shadow"]):
|
| 110 |
+
m = torch.ones(h, w)
|
| 111 |
+
for cx, cy, s, g in blobs:
|
| 112 |
+
m = m + (g - 1.0) * torch.exp(-((xx - cx) ** 2 + (yy - cy) ** 2) / (2 * s * s))
|
| 113 |
+
x[:, vi] = (x[:, vi] * m.clamp(min=0).to(x)).clamp(0, 1)
|
| 114 |
+
if p["wb_channel"] is not None:
|
| 115 |
+
for vi, g in enumerate(p["wb_channel"]):
|
| 116 |
+
x[:, vi] = (x[:, vi] * torch.tensor(g, dtype=x.dtype).view(1, 3, 1, 1)).clamp(0, 1)
|
| 117 |
+
y = x.reshape(t * v, c, h, w)
|
| 118 |
+
y = (y * float(2.0 ** p["exposure"])).clamp(0, 1)
|
| 119 |
+
d = p["temperature"]
|
| 120 |
+
y = (y * y.new_tensor([1.0 + d, 1.0, 1.0 - d]).view(1, 3, 1, 1)).clamp(0, 1)
|
| 121 |
+
y = ((y - 0.5) * p["contrast"] + 0.5).clamp(0, 1)
|
| 122 |
+
y = TF.adjust_saturation(y, p["saturation"])
|
| 123 |
+
y = TF.adjust_hue(y, p["hue"])
|
| 124 |
+
y = y.clamp(0, 1).pow(p["gamma"])
|
| 125 |
+
x = y.reshape(t, v, c, h, w)
|
| 126 |
+
mask = torch.ones(t, dtype=torch.bool) if obs_mask is None else torch.as_tensor(obs_mask, dtype=torch.bool)
|
| 127 |
+
if bool(mask.any()):
|
| 128 |
+
o = x[mask].reshape(-1, c, h, w)
|
| 129 |
+
if p["gaussian_blur"] > 0:
|
| 130 |
+
o = TF.gaussian_blur(o, [3, 3], [p["gaussian_blur"]] * 2)
|
| 131 |
+
if p["motion_blur"] is not None:
|
| 132 |
+
o = _conv(o, motion_kernel(*p["motion_blur"]))
|
| 133 |
+
if p["defocus"] > 0:
|
| 134 |
+
o = _conv(o, disk_kernel(p["defocus"]))
|
| 135 |
+
if p["sharpen"] > 0:
|
| 136 |
+
o = o + p["sharpen"] * (o - TF.gaussian_blur(o, [5, 5], [1.0, 1.0]))
|
| 137 |
+
o = o.clamp(0, 1)
|
| 138 |
+
if p["noise"] > 0:
|
| 139 |
+
gen = torch.Generator().manual_seed(int(noise_seed))
|
| 140 |
+
o = (o + torch.randn(o.shape, generator=gen, dtype=o.dtype) * p["noise"]).clamp(0, 1)
|
| 141 |
+
if p["jpeg"] is not None:
|
| 142 |
+
for i in range(o.shape[0]):
|
| 143 |
+
buf = io.BytesIO()
|
| 144 |
+
TF.to_pil_image(o[i]).save(buf, format="JPEG", quality=int(p["jpeg"]))
|
| 145 |
+
buf.seek(0)
|
| 146 |
+
with Image.open(buf) as im:
|
| 147 |
+
o[i] = TF.pil_to_tensor(im.convert("RGB")).to(o.dtype).div(255.0)
|
| 148 |
+
x[mask] = o.reshape(-1, v, c, h, w)
|
| 149 |
+
return x.clamp(0, 1)
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def augment(x, rng, obs_mask=None):
|
| 153 |
+
p = sample(rng, x.shape[1], x.shape[-2])
|
| 154 |
+
return apply(x, p, obs_mask, noise_seed=int(rng.integers(0, 2 ** 62))), p
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
def perturb_joints(q, rng):
|
| 158 |
+
q = np.asarray(q, dtype=np.float64)
|
| 159 |
+
d = q.shape[-1]
|
| 160 |
+
bias = rng.uniform(-math.radians(2.0), math.radians(2.0), size=d)
|
| 161 |
+
sigma = math.radians(0.25)
|
| 162 |
+
noise = np.clip(rng.normal(0.0, sigma, size=q.shape), -3 * sigma, 3 * sigma)
|
| 163 |
+
return (q + bias + noise).astype(np.float32)
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""FM-DiT, DP (Diffusion Policy, DDPM-DiT), ACT, FLASH, ODE-MLP and ODE-DiT visuomotor baselines of the Humanoid
|
| 2 |
+
Benchmark.
|
| 3 |
+
|
| 4 |
+
FM-DiT, DP and ACT are ported from DextraVerse's imitation-learning core (`dextraverse/algorithms/il/models/
|
| 5 |
+
{fm_dit,ddpm_dit,act}.py` and their networks), FLASH from NTUMARS/FLASH-Policy @ f47e490 (`flash.py`), ODE-MLP and
|
| 6 |
+
ODE-DiT after ODE Policy's G1 port (github.com/NTUMARS/ODE-POLICY real-g1; networks in ode_nets.py), each in its
|
| 7 |
+
authors' own configuration; torch only. `train.py` trains one on a task's LeRobot v2.1 expert dataset through a robot
|
| 8 |
+
contract (`data.CONTRACTS`: G1 state44/action76 or H2 state78/action75); `runtime.BaselinePolicy` serves a checkpoint
|
| 9 |
+
to the G1 evaluation adapters (`evaluation/policy/{FMDiT,DP,ACT,FLASH,ODEMLP,ODEDiT}/model.py`, via `adapters.py`) and
|
| 10 |
+
to the H2 adapter
|
| 11 |
+
(`debug/newton/h2_policy_adapters/baseline.py`). Usage and the environment: evaluation/README.md#baselines.
|
| 12 |
+
"""
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/act_nets.py
ADDED
|
@@ -0,0 +1,615 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""ACT (Zhao et al. 2023, "Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware") network core: the
|
| 2 |
+
ResNet backbone with frozen BatchNorm and sine position embedding, the DETR encoder-decoder transformer and the CVAE
|
| 3 |
+
action-chunk decoder.
|
| 4 |
+
|
| 5 |
+
Ported unchanged from DextraVerse (`dextraverse/algorithms/il/models/nets/act/`), which vendors the ACT repository's
|
| 6 |
+
`detr/models/{backbone,position_encoding,transformer,detr_vae}.py` (Apache-2.0, (c) Facebook, Inc. and its
|
| 7 |
+
affiliates; see THIRD_PARTY_NOTICES.md) with the NestedTensor/argparse plumbing removed, explicit `qpos_dim` /
|
| 8 |
+
`action_dim` instead of the ALOHA 14-DoF constants, and one backbone shared by every camera (upstream behaviour).
|
| 9 |
+
The policy uses `return_intermediate_dec=False`: `Transformer.forward(...)[0]` is the final decoder layer.
|
| 10 |
+
"""
|
| 11 |
+
from __future__ import annotations
|
| 12 |
+
|
| 13 |
+
import copy
|
| 14 |
+
import math
|
| 15 |
+
from typing import Optional
|
| 16 |
+
|
| 17 |
+
import numpy as np
|
| 18 |
+
import torch
|
| 19 |
+
import torch.nn.functional as F
|
| 20 |
+
import torchvision
|
| 21 |
+
from torch import Tensor, nn
|
| 22 |
+
from torchvision.models._utils import IntermediateLayerGetter
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class PositionEmbeddingSine(nn.Module):
|
| 26 |
+
"""Standard DETR sine embedding over a ``(B, C, H, W)`` feature map."""
|
| 27 |
+
|
| 28 |
+
def __init__(
|
| 29 |
+
self, num_pos_feats: int = 64, temperature: int = 10000, normalize: bool = False
|
| 30 |
+
) -> None:
|
| 31 |
+
super().__init__()
|
| 32 |
+
self.num_pos_feats = num_pos_feats
|
| 33 |
+
self.temperature = temperature
|
| 34 |
+
self.normalize = normalize
|
| 35 |
+
self.scale = 2 * math.pi
|
| 36 |
+
|
| 37 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 38 |
+
not_mask = torch.ones((1, x.shape[-2], x.shape[-1]), device=x.device)
|
| 39 |
+
y_embed = not_mask.cumsum(1, dtype=torch.float32)
|
| 40 |
+
x_embed = not_mask.cumsum(2, dtype=torch.float32)
|
| 41 |
+
if self.normalize:
|
| 42 |
+
eps = 1e-6
|
| 43 |
+
y_embed = y_embed / (y_embed[:, -1:, :] + eps) * self.scale
|
| 44 |
+
x_embed = x_embed / (x_embed[:, :, -1:] + eps) * self.scale
|
| 45 |
+
|
| 46 |
+
dim_t = torch.arange(self.num_pos_feats, dtype=torch.float32, device=x.device)
|
| 47 |
+
dim_t = self.temperature ** (2 * (dim_t // 2) / self.num_pos_feats)
|
| 48 |
+
|
| 49 |
+
pos_x = x_embed[:, :, :, None] / dim_t
|
| 50 |
+
pos_y = y_embed[:, :, :, None] / dim_t
|
| 51 |
+
pos_x = torch.stack(
|
| 52 |
+
(pos_x[:, :, :, 0::2].sin(), pos_x[:, :, :, 1::2].cos()), dim=4
|
| 53 |
+
).flatten(3)
|
| 54 |
+
pos_y = torch.stack(
|
| 55 |
+
(pos_y[:, :, :, 0::2].sin(), pos_y[:, :, :, 1::2].cos()), dim=4
|
| 56 |
+
).flatten(3)
|
| 57 |
+
return torch.cat((pos_y, pos_x), dim=3).permute(0, 3, 1, 2)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
class FrozenBatchNorm2d(nn.Module):
|
| 61 |
+
"""BatchNorm2d with fixed statistics and affine parameters (the DETR/ACT backbone norm)."""
|
| 62 |
+
|
| 63 |
+
def __init__(self, n: int) -> None:
|
| 64 |
+
super().__init__()
|
| 65 |
+
self.register_buffer("weight", torch.ones(n))
|
| 66 |
+
self.register_buffer("bias", torch.zeros(n))
|
| 67 |
+
self.register_buffer("running_mean", torch.zeros(n))
|
| 68 |
+
self.register_buffer("running_var", torch.ones(n))
|
| 69 |
+
|
| 70 |
+
def _load_from_state_dict(self, state_dict, prefix, local_metadata, strict, *args):
|
| 71 |
+
state_dict.pop(prefix + "num_batches_tracked", None)
|
| 72 |
+
super()._load_from_state_dict(state_dict, prefix, local_metadata, strict, *args)
|
| 73 |
+
|
| 74 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 75 |
+
w = self.weight.reshape(1, -1, 1, 1)
|
| 76 |
+
b = self.bias.reshape(1, -1, 1, 1)
|
| 77 |
+
rv = self.running_var.reshape(1, -1, 1, 1)
|
| 78 |
+
rm = self.running_mean.reshape(1, -1, 1, 1)
|
| 79 |
+
scale = w * (rv + 1e-5).rsqrt()
|
| 80 |
+
return x * scale + (b - rm * scale)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
class Backbone(nn.Module):
|
| 84 |
+
"""ResNet trunk returning the layer4 feature map."""
|
| 85 |
+
|
| 86 |
+
def __init__(self, name: str = "resnet18", weights: str | None = None) -> None:
|
| 87 |
+
super().__init__()
|
| 88 |
+
trunk = getattr(torchvision.models, name)(
|
| 89 |
+
replace_stride_with_dilation=[False, False, False],
|
| 90 |
+
weights=weights,
|
| 91 |
+
norm_layer=FrozenBatchNorm2d,
|
| 92 |
+
)
|
| 93 |
+
self.body = IntermediateLayerGetter(trunk, return_layers={"layer4": "0"})
|
| 94 |
+
self.num_channels = 512 if name in ("resnet18", "resnet34") else 2048
|
| 95 |
+
|
| 96 |
+
def forward(self, x: torch.Tensor) -> dict[str, torch.Tensor]:
|
| 97 |
+
return self.body(x)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
class Joiner(nn.Sequential):
|
| 101 |
+
"""Backbone + position embedding, returning matched feature/position lists."""
|
| 102 |
+
|
| 103 |
+
def __init__(self, backbone: Backbone, position_embedding: PositionEmbeddingSine) -> None:
|
| 104 |
+
super().__init__(backbone, position_embedding)
|
| 105 |
+
self.num_channels = backbone.num_channels
|
| 106 |
+
|
| 107 |
+
def forward(self, x: torch.Tensor) -> tuple[list[torch.Tensor], list[torch.Tensor]]:
|
| 108 |
+
features = list(self[0](x).values())
|
| 109 |
+
pos = [self[1](f).to(f.dtype) for f in features]
|
| 110 |
+
return features, pos
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
def build_backbone(
|
| 114 |
+
name: str = "resnet18", hidden_dim: int = 512, weights: str | None = None
|
| 115 |
+
) -> Joiner:
|
| 116 |
+
"""The ACT camera backbone: ResNet + sine embedding sized to the transformer width."""
|
| 117 |
+
return Joiner(Backbone(name, weights=weights), PositionEmbeddingSine(hidden_dim // 2))
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
class Transformer(nn.Module):
|
| 121 |
+
def __init__(
|
| 122 |
+
self,
|
| 123 |
+
d_model=512,
|
| 124 |
+
nhead=8,
|
| 125 |
+
num_encoder_layers=6,
|
| 126 |
+
num_decoder_layers=6,
|
| 127 |
+
dim_feedforward=2048,
|
| 128 |
+
dropout=0.1,
|
| 129 |
+
activation="relu",
|
| 130 |
+
normalize_before=False,
|
| 131 |
+
return_intermediate_dec=False,
|
| 132 |
+
):
|
| 133 |
+
super().__init__()
|
| 134 |
+
|
| 135 |
+
encoder_layer = TransformerEncoderLayer(
|
| 136 |
+
d_model, nhead, dim_feedforward, dropout, activation, normalize_before
|
| 137 |
+
)
|
| 138 |
+
encoder_norm = nn.LayerNorm(d_model) if normalize_before else None
|
| 139 |
+
self.encoder = TransformerEncoder(encoder_layer, num_encoder_layers, encoder_norm)
|
| 140 |
+
|
| 141 |
+
decoder_layer = TransformerDecoderLayer(
|
| 142 |
+
d_model, nhead, dim_feedforward, dropout, activation, normalize_before
|
| 143 |
+
)
|
| 144 |
+
decoder_norm = nn.LayerNorm(d_model)
|
| 145 |
+
self.decoder = TransformerDecoder(
|
| 146 |
+
decoder_layer,
|
| 147 |
+
num_decoder_layers,
|
| 148 |
+
decoder_norm,
|
| 149 |
+
return_intermediate=return_intermediate_dec,
|
| 150 |
+
)
|
| 151 |
+
|
| 152 |
+
self._reset_parameters()
|
| 153 |
+
|
| 154 |
+
self.d_model = d_model
|
| 155 |
+
self.nhead = nhead
|
| 156 |
+
|
| 157 |
+
def _reset_parameters(self):
|
| 158 |
+
for p in self.parameters():
|
| 159 |
+
if p.dim() > 1:
|
| 160 |
+
nn.init.xavier_uniform_(p)
|
| 161 |
+
|
| 162 |
+
def forward(
|
| 163 |
+
self,
|
| 164 |
+
src,
|
| 165 |
+
mask,
|
| 166 |
+
query_embed,
|
| 167 |
+
pos_embed,
|
| 168 |
+
latent_input=None,
|
| 169 |
+
proprio_input=None,
|
| 170 |
+
additional_pos_embed=None,
|
| 171 |
+
):
|
| 172 |
+
# TODO flatten only when input has H and W
|
| 173 |
+
if len(src.shape) == 4: # has H and W
|
| 174 |
+
# flatten NxCxHxW to HWxNxC
|
| 175 |
+
bs, c, h, w = src.shape
|
| 176 |
+
src = src.flatten(2).permute(2, 0, 1)
|
| 177 |
+
pos_embed = pos_embed.flatten(2).permute(2, 0, 1).repeat(1, bs, 1)
|
| 178 |
+
query_embed = query_embed.unsqueeze(1).repeat(1, bs, 1)
|
| 179 |
+
# mask = mask.flatten(1)
|
| 180 |
+
|
| 181 |
+
additional_pos_embed = additional_pos_embed.unsqueeze(1).repeat(
|
| 182 |
+
1, bs, 1
|
| 183 |
+
) # seq, bs, dim
|
| 184 |
+
pos_embed = torch.cat([additional_pos_embed, pos_embed], axis=0)
|
| 185 |
+
|
| 186 |
+
addition_input = torch.stack([latent_input, proprio_input], axis=0)
|
| 187 |
+
src = torch.cat([addition_input, src], axis=0)
|
| 188 |
+
else:
|
| 189 |
+
assert len(src.shape) == 3
|
| 190 |
+
# flatten NxHWxC to HWxNxC
|
| 191 |
+
bs, hw, c = src.shape
|
| 192 |
+
src = src.permute(1, 0, 2)
|
| 193 |
+
pos_embed = pos_embed.unsqueeze(1).repeat(1, bs, 1)
|
| 194 |
+
query_embed = query_embed.unsqueeze(1).repeat(1, bs, 1)
|
| 195 |
+
|
| 196 |
+
tgt = torch.zeros_like(query_embed)
|
| 197 |
+
memory = self.encoder(src, src_key_padding_mask=mask, pos=pos_embed)
|
| 198 |
+
hs = self.decoder(
|
| 199 |
+
tgt, memory, memory_key_padding_mask=mask, pos=pos_embed, query_pos=query_embed
|
| 200 |
+
)
|
| 201 |
+
hs = hs.transpose(1, 2)
|
| 202 |
+
return hs
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
class TransformerEncoder(nn.Module):
|
| 206 |
+
def __init__(self, encoder_layer, num_layers, norm=None):
|
| 207 |
+
super().__init__()
|
| 208 |
+
self.layers = _get_clones(encoder_layer, num_layers)
|
| 209 |
+
self.num_layers = num_layers
|
| 210 |
+
self.norm = norm
|
| 211 |
+
|
| 212 |
+
def forward(
|
| 213 |
+
self,
|
| 214 |
+
src,
|
| 215 |
+
mask: Optional[Tensor] = None,
|
| 216 |
+
src_key_padding_mask: Optional[Tensor] = None,
|
| 217 |
+
pos: Optional[Tensor] = None,
|
| 218 |
+
):
|
| 219 |
+
output = src
|
| 220 |
+
|
| 221 |
+
for layer in self.layers:
|
| 222 |
+
output = layer(
|
| 223 |
+
output, src_mask=mask, src_key_padding_mask=src_key_padding_mask, pos=pos
|
| 224 |
+
)
|
| 225 |
+
|
| 226 |
+
if self.norm is not None:
|
| 227 |
+
output = self.norm(output)
|
| 228 |
+
|
| 229 |
+
return output
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
class TransformerDecoder(nn.Module):
|
| 233 |
+
def __init__(self, decoder_layer, num_layers, norm=None, return_intermediate=False):
|
| 234 |
+
super().__init__()
|
| 235 |
+
self.layers = _get_clones(decoder_layer, num_layers)
|
| 236 |
+
self.num_layers = num_layers
|
| 237 |
+
self.norm = norm
|
| 238 |
+
self.return_intermediate = return_intermediate
|
| 239 |
+
|
| 240 |
+
def forward(
|
| 241 |
+
self,
|
| 242 |
+
tgt,
|
| 243 |
+
memory,
|
| 244 |
+
tgt_mask: Optional[Tensor] = None,
|
| 245 |
+
memory_mask: Optional[Tensor] = None,
|
| 246 |
+
tgt_key_padding_mask: Optional[Tensor] = None,
|
| 247 |
+
memory_key_padding_mask: Optional[Tensor] = None,
|
| 248 |
+
pos: Optional[Tensor] = None,
|
| 249 |
+
query_pos: Optional[Tensor] = None,
|
| 250 |
+
):
|
| 251 |
+
output = tgt
|
| 252 |
+
|
| 253 |
+
intermediate = []
|
| 254 |
+
|
| 255 |
+
for layer in self.layers:
|
| 256 |
+
output = layer(
|
| 257 |
+
output,
|
| 258 |
+
memory,
|
| 259 |
+
tgt_mask=tgt_mask,
|
| 260 |
+
memory_mask=memory_mask,
|
| 261 |
+
tgt_key_padding_mask=tgt_key_padding_mask,
|
| 262 |
+
memory_key_padding_mask=memory_key_padding_mask,
|
| 263 |
+
pos=pos,
|
| 264 |
+
query_pos=query_pos,
|
| 265 |
+
)
|
| 266 |
+
if self.return_intermediate:
|
| 267 |
+
intermediate.append(self.norm(output))
|
| 268 |
+
|
| 269 |
+
if self.norm is not None:
|
| 270 |
+
output = self.norm(output)
|
| 271 |
+
if self.return_intermediate:
|
| 272 |
+
intermediate.pop()
|
| 273 |
+
intermediate.append(output)
|
| 274 |
+
|
| 275 |
+
if self.return_intermediate:
|
| 276 |
+
return torch.stack(intermediate)
|
| 277 |
+
|
| 278 |
+
return output.unsqueeze(0)
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
class TransformerEncoderLayer(nn.Module):
|
| 282 |
+
def __init__(
|
| 283 |
+
self,
|
| 284 |
+
d_model,
|
| 285 |
+
nhead,
|
| 286 |
+
dim_feedforward=2048,
|
| 287 |
+
dropout=0.1,
|
| 288 |
+
activation="relu",
|
| 289 |
+
normalize_before=False,
|
| 290 |
+
):
|
| 291 |
+
super().__init__()
|
| 292 |
+
self.self_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout)
|
| 293 |
+
# Implementation of Feedforward model
|
| 294 |
+
self.linear1 = nn.Linear(d_model, dim_feedforward)
|
| 295 |
+
self.dropout = nn.Dropout(dropout)
|
| 296 |
+
self.linear2 = nn.Linear(dim_feedforward, d_model)
|
| 297 |
+
|
| 298 |
+
self.norm1 = nn.LayerNorm(d_model)
|
| 299 |
+
self.norm2 = nn.LayerNorm(d_model)
|
| 300 |
+
self.dropout1 = nn.Dropout(dropout)
|
| 301 |
+
self.dropout2 = nn.Dropout(dropout)
|
| 302 |
+
|
| 303 |
+
self.activation = _get_activation_fn(activation)
|
| 304 |
+
self.normalize_before = normalize_before
|
| 305 |
+
|
| 306 |
+
def with_pos_embed(self, tensor, pos: Optional[Tensor]):
|
| 307 |
+
return tensor if pos is None else tensor + pos
|
| 308 |
+
|
| 309 |
+
def forward_post(
|
| 310 |
+
self,
|
| 311 |
+
src,
|
| 312 |
+
src_mask: Optional[Tensor] = None,
|
| 313 |
+
src_key_padding_mask: Optional[Tensor] = None,
|
| 314 |
+
pos: Optional[Tensor] = None,
|
| 315 |
+
):
|
| 316 |
+
q = k = self.with_pos_embed(src, pos)
|
| 317 |
+
src2 = self.self_attn(
|
| 318 |
+
q, k, value=src, attn_mask=src_mask, key_padding_mask=src_key_padding_mask
|
| 319 |
+
)[0]
|
| 320 |
+
src = src + self.dropout1(src2)
|
| 321 |
+
src = self.norm1(src)
|
| 322 |
+
src2 = self.linear2(self.dropout(self.activation(self.linear1(src))))
|
| 323 |
+
src = src + self.dropout2(src2)
|
| 324 |
+
src = self.norm2(src)
|
| 325 |
+
return src
|
| 326 |
+
|
| 327 |
+
def forward_pre(
|
| 328 |
+
self,
|
| 329 |
+
src,
|
| 330 |
+
src_mask: Optional[Tensor] = None,
|
| 331 |
+
src_key_padding_mask: Optional[Tensor] = None,
|
| 332 |
+
pos: Optional[Tensor] = None,
|
| 333 |
+
):
|
| 334 |
+
src2 = self.norm1(src)
|
| 335 |
+
q = k = self.with_pos_embed(src2, pos)
|
| 336 |
+
src2 = self.self_attn(
|
| 337 |
+
q, k, value=src2, attn_mask=src_mask, key_padding_mask=src_key_padding_mask
|
| 338 |
+
)[0]
|
| 339 |
+
src = src + self.dropout1(src2)
|
| 340 |
+
src2 = self.norm2(src)
|
| 341 |
+
src2 = self.linear2(self.dropout(self.activation(self.linear1(src2))))
|
| 342 |
+
src = src + self.dropout2(src2)
|
| 343 |
+
return src
|
| 344 |
+
|
| 345 |
+
def forward(
|
| 346 |
+
self,
|
| 347 |
+
src,
|
| 348 |
+
src_mask: Optional[Tensor] = None,
|
| 349 |
+
src_key_padding_mask: Optional[Tensor] = None,
|
| 350 |
+
pos: Optional[Tensor] = None,
|
| 351 |
+
):
|
| 352 |
+
if self.normalize_before:
|
| 353 |
+
return self.forward_pre(src, src_mask, src_key_padding_mask, pos)
|
| 354 |
+
return self.forward_post(src, src_mask, src_key_padding_mask, pos)
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
class TransformerDecoderLayer(nn.Module):
|
| 358 |
+
def __init__(
|
| 359 |
+
self,
|
| 360 |
+
d_model,
|
| 361 |
+
nhead,
|
| 362 |
+
dim_feedforward=2048,
|
| 363 |
+
dropout=0.1,
|
| 364 |
+
activation="relu",
|
| 365 |
+
normalize_before=False,
|
| 366 |
+
):
|
| 367 |
+
super().__init__()
|
| 368 |
+
self.self_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout)
|
| 369 |
+
self.multihead_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout)
|
| 370 |
+
# Implementation of Feedforward model
|
| 371 |
+
self.linear1 = nn.Linear(d_model, dim_feedforward)
|
| 372 |
+
self.dropout = nn.Dropout(dropout)
|
| 373 |
+
self.linear2 = nn.Linear(dim_feedforward, d_model)
|
| 374 |
+
|
| 375 |
+
self.norm1 = nn.LayerNorm(d_model)
|
| 376 |
+
self.norm2 = nn.LayerNorm(d_model)
|
| 377 |
+
self.norm3 = nn.LayerNorm(d_model)
|
| 378 |
+
self.dropout1 = nn.Dropout(dropout)
|
| 379 |
+
self.dropout2 = nn.Dropout(dropout)
|
| 380 |
+
self.dropout3 = nn.Dropout(dropout)
|
| 381 |
+
|
| 382 |
+
self.activation = _get_activation_fn(activation)
|
| 383 |
+
self.normalize_before = normalize_before
|
| 384 |
+
|
| 385 |
+
def with_pos_embed(self, tensor, pos: Optional[Tensor]):
|
| 386 |
+
return tensor if pos is None else tensor + pos
|
| 387 |
+
|
| 388 |
+
def forward_post(
|
| 389 |
+
self,
|
| 390 |
+
tgt,
|
| 391 |
+
memory,
|
| 392 |
+
tgt_mask: Optional[Tensor] = None,
|
| 393 |
+
memory_mask: Optional[Tensor] = None,
|
| 394 |
+
tgt_key_padding_mask: Optional[Tensor] = None,
|
| 395 |
+
memory_key_padding_mask: Optional[Tensor] = None,
|
| 396 |
+
pos: Optional[Tensor] = None,
|
| 397 |
+
query_pos: Optional[Tensor] = None,
|
| 398 |
+
):
|
| 399 |
+
q = k = self.with_pos_embed(tgt, query_pos)
|
| 400 |
+
tgt2 = self.self_attn(
|
| 401 |
+
q, k, value=tgt, attn_mask=tgt_mask, key_padding_mask=tgt_key_padding_mask
|
| 402 |
+
)[0]
|
| 403 |
+
tgt = tgt + self.dropout1(tgt2)
|
| 404 |
+
tgt = self.norm1(tgt)
|
| 405 |
+
tgt2 = self.multihead_attn(
|
| 406 |
+
query=self.with_pos_embed(tgt, query_pos),
|
| 407 |
+
key=self.with_pos_embed(memory, pos),
|
| 408 |
+
value=memory,
|
| 409 |
+
attn_mask=memory_mask,
|
| 410 |
+
key_padding_mask=memory_key_padding_mask,
|
| 411 |
+
)[0]
|
| 412 |
+
tgt = tgt + self.dropout2(tgt2)
|
| 413 |
+
tgt = self.norm2(tgt)
|
| 414 |
+
tgt2 = self.linear2(self.dropout(self.activation(self.linear1(tgt))))
|
| 415 |
+
tgt = tgt + self.dropout3(tgt2)
|
| 416 |
+
tgt = self.norm3(tgt)
|
| 417 |
+
return tgt
|
| 418 |
+
|
| 419 |
+
def forward_pre(
|
| 420 |
+
self,
|
| 421 |
+
tgt,
|
| 422 |
+
memory,
|
| 423 |
+
tgt_mask: Optional[Tensor] = None,
|
| 424 |
+
memory_mask: Optional[Tensor] = None,
|
| 425 |
+
tgt_key_padding_mask: Optional[Tensor] = None,
|
| 426 |
+
memory_key_padding_mask: Optional[Tensor] = None,
|
| 427 |
+
pos: Optional[Tensor] = None,
|
| 428 |
+
query_pos: Optional[Tensor] = None,
|
| 429 |
+
):
|
| 430 |
+
tgt2 = self.norm1(tgt)
|
| 431 |
+
q = k = self.with_pos_embed(tgt2, query_pos)
|
| 432 |
+
tgt2 = self.self_attn(
|
| 433 |
+
q, k, value=tgt2, attn_mask=tgt_mask, key_padding_mask=tgt_key_padding_mask
|
| 434 |
+
)[0]
|
| 435 |
+
tgt = tgt + self.dropout1(tgt2)
|
| 436 |
+
tgt2 = self.norm2(tgt)
|
| 437 |
+
tgt2 = self.multihead_attn(
|
| 438 |
+
query=self.with_pos_embed(tgt2, query_pos),
|
| 439 |
+
key=self.with_pos_embed(memory, pos),
|
| 440 |
+
value=memory,
|
| 441 |
+
attn_mask=memory_mask,
|
| 442 |
+
key_padding_mask=memory_key_padding_mask,
|
| 443 |
+
)[0]
|
| 444 |
+
tgt = tgt + self.dropout2(tgt2)
|
| 445 |
+
tgt2 = self.norm3(tgt)
|
| 446 |
+
tgt2 = self.linear2(self.dropout(self.activation(self.linear1(tgt2))))
|
| 447 |
+
tgt = tgt + self.dropout3(tgt2)
|
| 448 |
+
return tgt
|
| 449 |
+
|
| 450 |
+
def forward(
|
| 451 |
+
self,
|
| 452 |
+
tgt,
|
| 453 |
+
memory,
|
| 454 |
+
tgt_mask: Optional[Tensor] = None,
|
| 455 |
+
memory_mask: Optional[Tensor] = None,
|
| 456 |
+
tgt_key_padding_mask: Optional[Tensor] = None,
|
| 457 |
+
memory_key_padding_mask: Optional[Tensor] = None,
|
| 458 |
+
pos: Optional[Tensor] = None,
|
| 459 |
+
query_pos: Optional[Tensor] = None,
|
| 460 |
+
):
|
| 461 |
+
if self.normalize_before:
|
| 462 |
+
return self.forward_pre(
|
| 463 |
+
tgt,
|
| 464 |
+
memory,
|
| 465 |
+
tgt_mask,
|
| 466 |
+
memory_mask,
|
| 467 |
+
tgt_key_padding_mask,
|
| 468 |
+
memory_key_padding_mask,
|
| 469 |
+
pos,
|
| 470 |
+
query_pos,
|
| 471 |
+
)
|
| 472 |
+
return self.forward_post(
|
| 473 |
+
tgt,
|
| 474 |
+
memory,
|
| 475 |
+
tgt_mask,
|
| 476 |
+
memory_mask,
|
| 477 |
+
tgt_key_padding_mask,
|
| 478 |
+
memory_key_padding_mask,
|
| 479 |
+
pos,
|
| 480 |
+
query_pos,
|
| 481 |
+
)
|
| 482 |
+
|
| 483 |
+
|
| 484 |
+
def _get_clones(module, N):
|
| 485 |
+
return nn.ModuleList([copy.deepcopy(module) for i in range(N)])
|
| 486 |
+
|
| 487 |
+
|
| 488 |
+
def _get_activation_fn(activation):
|
| 489 |
+
"""Return an activation function given a string."""
|
| 490 |
+
if activation == "relu":
|
| 491 |
+
return F.relu
|
| 492 |
+
if activation == "gelu":
|
| 493 |
+
return F.gelu
|
| 494 |
+
raise RuntimeError(f"activation should be relu/gelu, not {activation}.")
|
| 495 |
+
|
| 496 |
+
|
| 497 |
+
|
| 498 |
+
def reparametrize(mu: torch.Tensor, logvar: torch.Tensor) -> torch.Tensor:
|
| 499 |
+
std = logvar.div(2).exp()
|
| 500 |
+
return mu + std * torch.randn_like(std)
|
| 501 |
+
|
| 502 |
+
|
| 503 |
+
def get_sinusoid_encoding_table(n_position: int, d_hid: int) -> torch.Tensor:
|
| 504 |
+
def angle_vec(position: int) -> list[float]:
|
| 505 |
+
return [position / np.power(10000, 2 * (j // 2) / d_hid) for j in range(d_hid)]
|
| 506 |
+
|
| 507 |
+
table = np.array([angle_vec(i) for i in range(n_position)])
|
| 508 |
+
table[:, 0::2] = np.sin(table[:, 0::2])
|
| 509 |
+
table[:, 1::2] = np.cos(table[:, 1::2])
|
| 510 |
+
return torch.FloatTensor(table).unsqueeze(0)
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
def build_style_encoder(
|
| 514 |
+
hidden_dim: int, nheads: int, dim_feedforward: int, enc_layers: int, dropout: float
|
| 515 |
+
) -> TransformerEncoder:
|
| 516 |
+
"""The CVAE style encoder (a plain transformer encoder over [CLS, qpos, action seq])."""
|
| 517 |
+
layer = TransformerEncoderLayer(hidden_dim, nheads, dim_feedforward, dropout, "relu", False)
|
| 518 |
+
return TransformerEncoder(layer, enc_layers, norm=None)
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
class DETRVAE(nn.Module):
|
| 522 |
+
"""CVAE decoder: (qpos, images[, action seq]) → ``num_queries`` future actions."""
|
| 523 |
+
|
| 524 |
+
def __init__(
|
| 525 |
+
self,
|
| 526 |
+
backbone: Joiner,
|
| 527 |
+
transformer: Transformer,
|
| 528 |
+
encoder: TransformerEncoder,
|
| 529 |
+
*,
|
| 530 |
+
qpos_dim: int,
|
| 531 |
+
action_dim: int,
|
| 532 |
+
num_queries: int,
|
| 533 |
+
latent_dim: int = 32,
|
| 534 |
+
) -> None:
|
| 535 |
+
super().__init__()
|
| 536 |
+
self.num_queries = num_queries
|
| 537 |
+
self.transformer = transformer
|
| 538 |
+
self.encoder = encoder
|
| 539 |
+
hidden_dim = transformer.d_model
|
| 540 |
+
self.action_head = nn.Linear(hidden_dim, action_dim)
|
| 541 |
+
self.query_embed = nn.Embedding(num_queries, hidden_dim)
|
| 542 |
+
self.backbone = backbone # ONE backbone shared by every camera (upstream behavior)
|
| 543 |
+
self.input_proj = nn.Conv2d(backbone.num_channels, hidden_dim, kernel_size=1)
|
| 544 |
+
self.input_proj_robot_state = nn.Linear(qpos_dim, hidden_dim)
|
| 545 |
+
|
| 546 |
+
# CVAE style encoder inputs
|
| 547 |
+
self.latent_dim = latent_dim
|
| 548 |
+
self.cls_embed = nn.Embedding(1, hidden_dim)
|
| 549 |
+
self.encoder_action_proj = nn.Linear(action_dim, hidden_dim)
|
| 550 |
+
self.encoder_joint_proj = nn.Linear(qpos_dim, hidden_dim)
|
| 551 |
+
self.latent_proj = nn.Linear(hidden_dim, latent_dim * 2)
|
| 552 |
+
self.register_buffer(
|
| 553 |
+
"pos_table", get_sinusoid_encoding_table(1 + 1 + num_queries, hidden_dim)
|
| 554 |
+
)
|
| 555 |
+
# decoder side
|
| 556 |
+
self.latent_out_proj = nn.Linear(latent_dim, hidden_dim)
|
| 557 |
+
self.additional_pos_embed = nn.Embedding(2, hidden_dim) # latent + proprio slots
|
| 558 |
+
|
| 559 |
+
def forward(
|
| 560 |
+
self,
|
| 561 |
+
qpos: torch.Tensor,
|
| 562 |
+
images: torch.Tensor,
|
| 563 |
+
actions: torch.Tensor | None = None,
|
| 564 |
+
is_pad: torch.Tensor | None = None,
|
| 565 |
+
) -> tuple[torch.Tensor, tuple[torch.Tensor | None, torch.Tensor | None]]:
|
| 566 |
+
"""``qpos (B, Dq)``, ``images (B, ncam, C, H, W)``; train passes ``actions (B, T, Da)``."""
|
| 567 |
+
is_training = actions is not None
|
| 568 |
+
bs = qpos.shape[0]
|
| 569 |
+
if is_training:
|
| 570 |
+
action_embed = self.encoder_action_proj(actions)
|
| 571 |
+
qpos_embed = self.encoder_joint_proj(qpos).unsqueeze(1)
|
| 572 |
+
cls_embed = self.cls_embed.weight.unsqueeze(0).repeat(bs, 1, 1)
|
| 573 |
+
encoder_input = torch.cat([cls_embed, qpos_embed, action_embed], dim=1)
|
| 574 |
+
encoder_input = encoder_input.permute(1, 0, 2)
|
| 575 |
+
if is_pad is None:
|
| 576 |
+
is_pad = torch.zeros(bs, actions.shape[1], dtype=torch.bool, device=qpos.device)
|
| 577 |
+
cls_joint_is_pad = torch.full((bs, 2), False, device=qpos.device)
|
| 578 |
+
key_pad = torch.cat([cls_joint_is_pad, is_pad], dim=1)
|
| 579 |
+
pos_embed = self.pos_table.clone().detach().permute(1, 0, 2)
|
| 580 |
+
encoder_output = self.encoder(
|
| 581 |
+
encoder_input, pos=pos_embed, src_key_padding_mask=key_pad
|
| 582 |
+
)[0]
|
| 583 |
+
latent_info = self.latent_proj(encoder_output)
|
| 584 |
+
mu = latent_info[:, : self.latent_dim]
|
| 585 |
+
logvar = latent_info[:, self.latent_dim :]
|
| 586 |
+
latent_input = self.latent_out_proj(reparametrize(mu, logvar))
|
| 587 |
+
else:
|
| 588 |
+
mu = logvar = None
|
| 589 |
+
latent_sample = torch.zeros(bs, self.latent_dim, device=qpos.device)
|
| 590 |
+
latent_input = self.latent_out_proj(latent_sample)
|
| 591 |
+
|
| 592 |
+
all_cam_features, all_cam_pos = [], []
|
| 593 |
+
for cam_id in range(images.shape[1]):
|
| 594 |
+
features, pos = self.backbone(images[:, cam_id])
|
| 595 |
+
all_cam_features.append(self.input_proj(features[0]))
|
| 596 |
+
all_cam_pos.append(pos[0])
|
| 597 |
+
proprio_input = self.input_proj_robot_state(qpos)
|
| 598 |
+
src = torch.cat(all_cam_features, dim=3) # cameras fold into the width axis
|
| 599 |
+
pos = torch.cat(all_cam_pos, dim=3)
|
| 600 |
+
hs = self.transformer(
|
| 601 |
+
src,
|
| 602 |
+
None,
|
| 603 |
+
self.query_embed.weight,
|
| 604 |
+
pos,
|
| 605 |
+
latent_input,
|
| 606 |
+
proprio_input,
|
| 607 |
+
self.additional_pos_embed.weight,
|
| 608 |
+
)[0]
|
| 609 |
+
return self.action_head(hs), (mu, logvar)
|
| 610 |
+
|
| 611 |
+
|
| 612 |
+
def kl_divergence(mu: torch.Tensor, logvar: torch.Tensor) -> torch.Tensor:
|
| 613 |
+
"""Total KL(q(z|x) || N(0, I)), summed over latent dims, meaned over the batch."""
|
| 614 |
+
klds = -0.5 * (1 + logvar - mu.pow(2) - logvar.exp())
|
| 615 |
+
return klds.sum(1).mean()
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/adapters.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""The G1 evaluation adapters of the baselines (evaluation/README.md#the-model-interface): `make_model('fm_dit')`
|
| 2 |
+
returns the `Model` class that `evaluation/policy/FMDiT/model.py` exports (likewise DP, ACT, FLASH, ODEMLP, ODEDiT).
|
| 3 |
+
|
| 4 |
+
Observation: the current ego_view and chest frames (480x640 RGB, resized as the training cache) and state44; FM-DiT,
|
| 5 |
+
DP and ACT read no past actions or earlier frames (one frame); FLASH and the ODE policies also read the interface's
|
| 6 |
+
executed rows before the query (`past_actions`, `history_valid`: the token sent and the INSPIRE opening measured at
|
| 7 |
+
each earlier frame): FLASH for its polynomial history, the ODE policies the last one (frame t-1) as their start.
|
| 8 |
+
Output: the checkpoint's whole chunk (16 rows of action76, row 0 executed at the request's frame), `execution_steps`
|
| 9 |
+
rows of it executed before the next query (deploy.yml `config: execution_steps`, default the whole chunk; the runners
|
| 10 |
+
re-query after at most 12 rows), the request's seed for the sampling noise (FM-DiT, DP).
|
| 11 |
+
"""
|
| 12 |
+
from __future__ import annotations
|
| 13 |
+
|
| 14 |
+
from .runtime import BaselinePolicy
|
| 15 |
+
|
| 16 |
+
WIDTH = {'sonic_dfx6': 76}
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def require(condition, message):
|
| 20 |
+
if not condition:
|
| 21 |
+
raise RuntimeError(message)
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def make_model(policy_name: str):
|
| 25 |
+
class Model:
|
| 26 |
+
history_length = 1 # the current head and chest frames only
|
| 27 |
+
video_frames = 0
|
| 28 |
+
|
| 29 |
+
def __init__(self, cfg):
|
| 30 |
+
self.policy = BaselinePolicy(cfg['checkpoint_path'], device=cfg.get('device', 'cuda:0'),
|
| 31 |
+
policy=policy_name, robot='g1')
|
| 32 |
+
contract = self.policy.contract
|
| 33 |
+
require(cfg['action_space'] in WIDTH and contract['action_space'] == cfg['action_space']
|
| 34 |
+
and self.policy.action_dim == WIDTH[cfg['action_space']] and self.policy.state_dim == 44
|
| 35 |
+
and list(self.policy.cameras) == ['ego_view', 'chest'],
|
| 36 |
+
f"checkpoint contract {contract['name']} does not serve {cfg['action_space']}")
|
| 37 |
+
extra = cfg.get('config') or {}
|
| 38 |
+
if extra.get('check_task', True):
|
| 39 |
+
require(cfg['task'].strip() == (self.policy.task_text or '').strip(),
|
| 40 |
+
f'task text {cfg["task"]!r} is not the training task {self.policy.task_text!r}')
|
| 41 |
+
self.execution_steps = int(extra.get('execution_steps') or self.policy.horizon)
|
| 42 |
+
require(1 <= self.execution_steps <= self.policy.horizon, f'execution_steps {self.execution_steps}')
|
| 43 |
+
self.uses_history = self.policy.name == 'flash' or self.policy.uses_previous
|
| 44 |
+
self.info = dict(self.policy.info(), execution_steps=self.execution_steps,
|
| 45 |
+
inputs='current frames + state44' + (' + executed-action history' if self.uses_history
|
| 46 |
+
else ''))
|
| 47 |
+
|
| 48 |
+
def get_action(self, obs):
|
| 49 |
+
if self.uses_history:
|
| 50 |
+
action, _ = self.policy.predict(obs['images'], obs['state'], seed=obs['seed'],
|
| 51 |
+
past_actions=obs['past_actions'], history_valid=obs['history_valid'])
|
| 52 |
+
else:
|
| 53 |
+
action, _ = self.policy.predict(obs['images'], obs['state'], seed=obs['seed'])
|
| 54 |
+
return dict(action=action, execution_steps=self.execution_steps,
|
| 55 |
+
sampling_steps=self.policy.sampling_steps)
|
| 56 |
+
|
| 57 |
+
Model.__name__ = Model.__qualname__ = f'Model_{policy_name}'
|
| 58 |
+
return Model
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/check_flash_adapter.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Offline check of the FLASH adapter against the training path on recorded frames (before any closed-loop run):
|
| 2 |
+
|
| 3 |
+
<baselines env>/bin/python -I evaluation/baselines/check_flash_adapter.py --checkpoint <checkpoints/step-NNNNNN> \\
|
| 4 |
+
--dataset <LeRobot v2.1 root> --episodes 0,60 --queries 8 [--device cuda:0]
|
| 5 |
+
|
| 6 |
+
For query frames t of each episode (0, then evenly spaced) it builds
|
| 7 |
+
(a) the interface observation a runner sends: the 480x640 ego_view / chest frames (decoded from the dataset videos),
|
| 8 |
+
state44 and past_actions = the 40 recorded action rows before t (history_valid 0 before the episode start), and
|
| 9 |
+
calls evaluation/policy/FLASH/model.py Model.get_action, the deployed adapter;
|
| 10 |
+
(b) the training path: FlashChunkDataset's item for the same anchor (frames resized as the frame cache, the dataset's
|
| 11 |
+
history rule) through FlashPolicy.predict.
|
| 12 |
+
Both chunks must be equal bit for bit (same weights, same device); it also prints the normalized MSE of the chunk
|
| 13 |
+
against the recorded rows from t (rows past the episode's end excluded). Exits 1 on a mismatch.
|
| 14 |
+
"""
|
| 15 |
+
from __future__ import annotations
|
| 16 |
+
|
| 17 |
+
import argparse
|
| 18 |
+
import json
|
| 19 |
+
from pathlib import Path
|
| 20 |
+
import sys
|
| 21 |
+
|
| 22 |
+
import numpy as np
|
| 23 |
+
|
| 24 |
+
HERE = Path(__file__).resolve().parent
|
| 25 |
+
EVALUATION = HERE.parent
|
| 26 |
+
if str(EVALUATION) not in sys.path:
|
| 27 |
+
sys.path.insert(0, str(EVALUATION))
|
| 28 |
+
|
| 29 |
+
HISTORY_ROWS = 40 # the interface's past_actions rows (debug/newton/b6_policy_eval.py HISTORY_ROWS)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def decode(path, indices):
|
| 33 |
+
import av
|
| 34 |
+
want, out = set(int(i) for i in indices), {}
|
| 35 |
+
with av.open(str(path)) as container:
|
| 36 |
+
for k, frame in enumerate(container.decode(video=0)):
|
| 37 |
+
if k in want:
|
| 38 |
+
out[k] = frame.to_ndarray(format='rgb24')
|
| 39 |
+
if len(out) == len(want):
|
| 40 |
+
break
|
| 41 |
+
return out
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
def main():
|
| 45 |
+
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
| 46 |
+
p.add_argument('--checkpoint', type=Path, required=True)
|
| 47 |
+
p.add_argument('--dataset', type=Path, required=True)
|
| 48 |
+
p.add_argument('--episodes', default='0')
|
| 49 |
+
p.add_argument('--queries', type=int, default=8)
|
| 50 |
+
p.add_argument('--device', default='cuda:0')
|
| 51 |
+
a = p.parse_args()
|
| 52 |
+
|
| 53 |
+
import torch
|
| 54 |
+
from baselines.data import CONTRACTS, FlashChunkDataset, LeRobotDataset, load_lowdim, resize_frame
|
| 55 |
+
from baselines.runtime import BaselinePolicy
|
| 56 |
+
sys.path.insert(0, str(EVALUATION / 'policy' / 'FLASH'))
|
| 57 |
+
import model as flash_model
|
| 58 |
+
|
| 59 |
+
base = BaselinePolicy(a.checkpoint, device=a.device, policy='flash', robot='g1')
|
| 60 |
+
contract = CONTRACTS[base.contract['name']]
|
| 61 |
+
adapter = flash_model.Model(dict(checkpoint_path=str(a.checkpoint), device=a.device, action_space='sonic_dfx6',
|
| 62 |
+
task=base.task_text or '', config={}))
|
| 63 |
+
policy = adapter.policy.model # the adapter's own loaded weights
|
| 64 |
+
dataset = LeRobotDataset(a.dataset)
|
| 65 |
+
episodes = [int(e) for e in a.episodes.split(',')]
|
| 66 |
+
lowdim = load_lowdim(dataset, contract, episodes)
|
| 67 |
+
report, worst = [], 0.0
|
| 68 |
+
for pos, ep in enumerate(episodes):
|
| 69 |
+
s, n = int(lowdim['starts'][pos]), int(lowdim['lengths'][pos])
|
| 70 |
+
ts = sorted({0, *np.linspace(0, n - 1, a.queries).astype(int).tolist()})[:a.queries]
|
| 71 |
+
frames = {c: decode(dataset.video(ep, c), ts) for c in base.cameras}
|
| 72 |
+
hw = base.image_hw
|
| 73 |
+
maps = {c: np.zeros((lowdim['lengths'].sum(), *hw, 3), np.uint8) for c in base.cameras}
|
| 74 |
+
for t in ts:
|
| 75 |
+
for c in base.cameras:
|
| 76 |
+
maps[c][s + t] = resize_frame(frames[c][t], hw) # the frame cache's resize of the same frame
|
| 77 |
+
f = policy.flash
|
| 78 |
+
H_ext = f['poly_prefix'] + f['n_action'] + f['poly_suffix'] + 2 * f['fit_pad']
|
| 79 |
+
offsets = (np.arange(H_ext) - (f['fit_pad'] + f['poly_prefix'])) * f['stride']
|
| 80 |
+
ds = FlashChunkDataset(lowdim, {}, base.cameras, hw, [pos], offsets=offsets, stride=f['stride'],
|
| 81 |
+
n_history=f['n_history'], rows=f['rows'], with_dense=True)
|
| 82 |
+
ds._maps, ds._pid = maps, __import__('os').getpid()
|
| 83 |
+
for t in ts:
|
| 84 |
+
k = int(np.nonzero(ds.index == s + t)[0][0])
|
| 85 |
+
images, state, _, hist, has, dense, dense_valid = ds[k]
|
| 86 |
+
idx = np.arange(t - HISTORY_ROWS, t)
|
| 87 |
+
past = lowdim['action'][s + np.clip(idx, 0, n - 1)].astype(np.float32)
|
| 88 |
+
valid = (idx >= 0).astype(np.float32)
|
| 89 |
+
past[idx < 0] = 0.0
|
| 90 |
+
obs = dict(images={c: frames[c][t] for c in base.cameras}, state=lowdim['state'][s + t],
|
| 91 |
+
past_actions=past, history_valid=valid, seed=0, frame=t, history_frame=t)
|
| 92 |
+
a_chunk = adapter.get_action(obs)['action']
|
| 93 |
+
with torch.inference_mode():
|
| 94 |
+
img = images[None].to(a.device).permute(0, 1, 4, 2, 3).float().div_(255.)
|
| 95 |
+
b_chunk, _ = policy.predict(img, state[None].to(a.device), hist[None].to(a.device),
|
| 96 |
+
has[None].to(a.device))
|
| 97 |
+
b_chunk = b_chunk[0].float().cpu().numpy()
|
| 98 |
+
diff = float(np.abs(a_chunk - b_chunk).max())
|
| 99 |
+
worst = max(worst, diff)
|
| 100 |
+
nrm = policy.action_norm
|
| 101 |
+
err = (nrm.normalize(torch.from_numpy(a_chunk).to(a.device)) -
|
| 102 |
+
nrm.normalize(dense.to(a.device))).pow(2).cpu().numpy()[dense_valid.numpy()]
|
| 103 |
+
report.append(dict(episode=ep, t=t, has_history=bool(has), max_abs_diff=diff,
|
| 104 |
+
nmse_vs_recorded=float(err.mean()),
|
| 105 |
+
token_cos_row0=float(np.dot(a_chunk[0, :64], dense[0, :64].numpy()) /
|
| 106 |
+
(np.linalg.norm(a_chunk[0, :64]) *
|
| 107 |
+
np.linalg.norm(dense[0, :64].numpy()) + 1e-12))))
|
| 108 |
+
ok = worst == 0.0
|
| 109 |
+
print(json.dumps(dict(ok=ok, max_abs_diff=worst, checkpoint=str(a.checkpoint), queries=report), indent=1))
|
| 110 |
+
sys.exit(0 if ok else 1)
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
if __name__ == '__main__':
|
| 114 |
+
main()
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/check_flash_parity.py
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Check the FLASH port (evaluation/baselines/flash.py) against the upstream policy, on the CPU:
|
| 2 |
+
|
| 3 |
+
<baselines env>/bin/python -I evaluation/baselines/check_flash_parity.py --upstream <FLASH-Policy checkout>
|
| 4 |
+
|
| 5 |
+
Upstream is NTUMARS/FLASH-Policy @ f47e490 (roboverse_learn/il/...); its `zarr` and `einops` imports are shimmed
|
| 6 |
+
when the environment lacks them (only the parts used here run). Compared, for flash.yaml's settings with n_obs_steps =
|
| 7 |
+
n_history (8), n_action_steps 8, horizon 16:
|
| 8 |
+
|
| 9 |
+
- the polynomial buffers: least-squares matrix, coefficient scales, Tikhonov history fit, KKT boundary-constraint
|
| 10 |
+
matrices and pinned indices;
|
| 11 |
+
- target coefficients (least squares + boundary constraint) and history coefficients on random normalized
|
| 12 |
+
trajectories (identity normalizers on both sides);
|
| 13 |
+
- the DiT: upstream FlowTransformer's weights loaded strictly into FlashFlowTransformer, same outputs;
|
| 14 |
+
- the image encoder: upstream MultiImageObsEncoder (two rgb keys, agent_pos) with this port's weights, same features
|
| 15 |
+
(upstream concatenates its rgb keys in sorted order);
|
| 16 |
+
- the 30 Hz output rows: at multiples of the stride they equal upstream's trajectory points from the anchor.
|
| 17 |
+
Prints one JSON line with the largest differences; exits 1 when one exceeds its tolerance.
|
| 18 |
+
"""
|
| 19 |
+
from __future__ import annotations
|
| 20 |
+
|
| 21 |
+
import argparse
|
| 22 |
+
import json
|
| 23 |
+
from pathlib import Path
|
| 24 |
+
import sys
|
| 25 |
+
import types
|
| 26 |
+
|
| 27 |
+
import torch
|
| 28 |
+
|
| 29 |
+
HERE = Path(__file__).resolve().parent
|
| 30 |
+
if str(HERE.parent) not in sys.path:
|
| 31 |
+
sys.path.insert(0, str(HERE.parent))
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def shim_upstream_imports():
|
| 35 |
+
try:
|
| 36 |
+
import zarr # noqa: F401
|
| 37 |
+
except ImportError:
|
| 38 |
+
zarr = types.ModuleType('zarr')
|
| 39 |
+
zarr.Array = type('Array', (), {})
|
| 40 |
+
sys.modules['zarr'] = zarr
|
| 41 |
+
try:
|
| 42 |
+
import einops # noqa: F401
|
| 43 |
+
except ImportError:
|
| 44 |
+
einops = types.ModuleType('einops')
|
| 45 |
+
einops.reduce = lambda x, pattern, op: x.reshape(x.shape[0], -1) # "b ... -> b (...)" (no reduced axis)
|
| 46 |
+
sys.modules['einops'] = einops
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def main():
|
| 50 |
+
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
| 51 |
+
p.add_argument('--upstream', type=Path, required=True, help='FLASH-Policy checkout (commit f47e490)')
|
| 52 |
+
p.add_argument('--stride', type=int, default=2)
|
| 53 |
+
a = p.parse_args()
|
| 54 |
+
shim_upstream_imports()
|
| 55 |
+
sys.path.insert(0, str(a.upstream.resolve()))
|
| 56 |
+
from roboverse_learn.il.policies.flash.flash_policy import FlashDiTImagePolicy
|
| 57 |
+
from roboverse_learn.il.utils.models.flow_net import FlowTransformer
|
| 58 |
+
from roboverse_learn.il.utils.vision.model_getter import get_resnet
|
| 59 |
+
from roboverse_learn.il.utils.vision.multi_image_obs_encoder import MultiImageObsEncoder
|
| 60 |
+
from baselines.flash import FLASH_DEFAULTS, FLASH_POLICY_FIELDS, FlashFlowTransformer
|
| 61 |
+
from baselines.policies import PolicyConfig, build_policy
|
| 62 |
+
|
| 63 |
+
torch.manual_seed(0)
|
| 64 |
+
Da, Ds, H, W = 76, 44, 48, 64
|
| 65 |
+
f = dict(FLASH_DEFAULTS, stride=a.stride)
|
| 66 |
+
cfg = PolicyConfig.from_dict(dict(policy='flash', n_cameras=2, state_dim=Ds, action_dim=Da, horizon=f['rows'],
|
| 67 |
+
**FLASH_POLICY_FIELDS, extra=dict(flash=f)))
|
| 68 |
+
ours = build_policy(cfg, pretrained=False).eval()
|
| 69 |
+
shape_meta = dict(obs=dict(ego_view=dict(shape=[3, H, W], type='rgb'), chest=dict(shape=[3, H, W], type='rgb'),
|
| 70 |
+
agent_pos=dict(shape=[Ds], type='low_dim')), action=dict(shape=[Da]))
|
| 71 |
+
enc = MultiImageObsEncoder(shape_meta=shape_meta, rgb_model=get_resnet('resnet18', weights=None),
|
| 72 |
+
resize_shape=None, crop_shape=None, random_crop=True, use_group_norm=True,
|
| 73 |
+
share_rgb_model=False, imagenet_norm=True)
|
| 74 |
+
up = FlashDiTImagePolicy(shape_meta=shape_meta, obs_encoder=enc, horizon=f['n_history'] + f['n_action'],
|
| 75 |
+
n_action_steps=f['n_action'], n_obs_steps=f['n_history'], num_inference_steps=1,
|
| 76 |
+
obs_as_global_cond=True, diffusion_step_embed_dim=256, hidden_dim=512, num_layers=4,
|
| 77 |
+
num_heads=8, mlp_ratio=4, dropout=0.0, poly_order=f['poly_order'], basis_type='legendre',
|
| 78 |
+
fit_pad=f['fit_pad'], boundary_constraint=f['boundary_constraint'],
|
| 79 |
+
history_noise_std=f['history_noise_std'], history_reg_lambda=f['history_reg_lambda'],
|
| 80 |
+
consistency_weight=f['consistency_weight'], flash_solver='euler',
|
| 81 |
+
poly_prefix=f['poly_prefix'], poly_suffix=f['poly_suffix']).eval()
|
| 82 |
+
res, tol = {}, {}
|
| 83 |
+
|
| 84 |
+
def diff(name, x, y, t):
|
| 85 |
+
res[name] = float((x.double() - y.double()).abs().max())
|
| 86 |
+
tol[name] = t
|
| 87 |
+
|
| 88 |
+
for b in ('_lstsq_matrix', '_coeff_scale', '_history_lstsq_matrix', '_bc_eval_pos', '_bc_eval_vel',
|
| 89 |
+
'_bc_correction'):
|
| 90 |
+
diff(b, getattr(ours, b), getattr(up, b), 1e-6)
|
| 91 |
+
res['_bc_pos_indices_equal'] = bool(torch.equal(ours._bc_pos_indices, up._bc_pos_indices))
|
| 92 |
+
|
| 93 |
+
# identity normalizers on both sides: compare the polynomial algebra itself
|
| 94 |
+
B = 6
|
| 95 |
+
traj = torch.randn(B, ours.H_ext, Da)
|
| 96 |
+
hist = torch.randn(B, f['n_history'], Da)
|
| 97 |
+
with torch.no_grad():
|
| 98 |
+
t_up = up._apply_boundary_constraint(up._trajectory_to_coefficients(traj), traj)
|
| 99 |
+
t_ours = ours._apply_boundary_constraint(ours._to_coeff(traj), traj)
|
| 100 |
+
diff('target_coeff', t_ours, t_up, 1e-4)
|
| 101 |
+
h_up = up._history_to_coefficients(hist)
|
| 102 |
+
h_ours = torch.einsum('ch,bhd->bcd', ours._history_lstsq_matrix, hist) / ours._coeff_scale
|
| 103 |
+
diff('history_coeff', h_ours, h_up, 1e-5)
|
| 104 |
+
|
| 105 |
+
# DiT: upstream weights into the port
|
| 106 |
+
dit_up = FlowTransformer(input_dim=Da, condition_dim=300, hidden_dim=512, output_dim=Da, num_layers=4,
|
| 107 |
+
num_heads=8, mlp_ratio=4, dropout=0.0, time_embed_dim=256).eval()
|
| 108 |
+
dit_ours = FlashFlowTransformer(input_dim=Da, condition_dim=300, hidden_dim=512, output_dim=Da, num_layers=4,
|
| 109 |
+
num_heads=8, mlp_ratio=4, dropout=0.0, time_embed_dim=256).eval()
|
| 110 |
+
dit_ours.load_state_dict(dit_up.state_dict(), strict=True)
|
| 111 |
+
x, t, c = torch.randn(B, ours.num_coeff, Da), torch.rand(B), torch.randn(B, 300)
|
| 112 |
+
diff('dit', dit_ours(x, t, c), dit_up(x, t, c), 1e-5)
|
| 113 |
+
|
| 114 |
+
# encoder: the port's ResNets into upstream's per-key models (sorted keys: chest, ego_view)
|
| 115 |
+
for i, cam in enumerate(('ego_view', 'chest')):
|
| 116 |
+
enc.key_model_map[cam].load_state_dict(ours.obs_encoder.rgb[i].state_dict(), strict=True)
|
| 117 |
+
imgs, state_n = torch.rand(B, 2, 3, H, W), torch.rand(B, Ds) * 2 - 1
|
| 118 |
+
f_ours = ours.obs_encoder(imgs, state_n)
|
| 119 |
+
f_up = enc({'ego_view': imgs[:, 0] * 2 - 1, 'chest': imgs[:, 1] * 2 - 1, 'agent_pos': state_n})
|
| 120 |
+
n = 512
|
| 121 |
+
f_up_reordered = torch.cat([f_up[:, n:2 * n], f_up[:, :n], f_up[:, 2 * n:]], dim=-1) # chest|ego -> ego|chest
|
| 122 |
+
diff('encoder', f_ours, f_up_reordered, 1e-4)
|
| 123 |
+
|
| 124 |
+
# 30 Hz rows from the anchor vs upstream's points: identity normalizer on ours
|
| 125 |
+
ours.action_norm.scale.fill_(1.0)
|
| 126 |
+
ours.action_norm.offset.zero_()
|
| 127 |
+
coeff = torch.randn(B, ours.num_coeff, Da)
|
| 128 |
+
dense = ours.dense_from_coeff(coeff)
|
| 129 |
+
sparse = up._coefficients_to_trajectory(coeff) # (B, H_poly, Da), anchor at up._anchor_idx
|
| 130 |
+
k = torch.arange(0, ours.rows, a.stride)
|
| 131 |
+
j = up._anchor_idx + k // a.stride
|
| 132 |
+
diff('dense_vs_upstream_points', dense[:, k], sparse[:, j], 1e-4)
|
| 133 |
+
bad = {k: v for k, v in res.items() if k in tol and v > tol[k]}
|
| 134 |
+
ok = not bad and res['_bc_pos_indices_equal']
|
| 135 |
+
print(json.dumps(dict(ok=ok, max_abs_diff=res, tolerance=tol, stride=a.stride,
|
| 136 |
+
upstream_anchor_idx=int(up._anchor_idx), port_anchor=int(ours.anchor))), flush=True)
|
| 137 |
+
sys.exit(0 if ok else 1)
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
if __name__ == '__main__':
|
| 141 |
+
main()
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/data.py
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Training data of the baselines: a task's LeRobot v2.1 expert dataset read through a robot contract.
|
| 2 |
+
|
| 3 |
+
A contract names the cameras and which dataset columns form the policy state and the action rows, the same layouts
|
| 4 |
+
the registered GR00T / Psi0 checkpoints were trained on:
|
| 5 |
+
|
| 6 |
+
- `g1_sonic_dfx6` (G1 + INSPIRE, the evaluation/README.md interface; ego_view, chest): state44 =
|
| 7 |
+
`observation.state[0:29]` body, measured `observation.inspire_{left,right}_hand_state`,
|
| 8 |
+
`observation.projected_gravity`; action76 (`sonic_dfx6`) = `action.motion_token` 64 and the measured DFX6 of the
|
| 9 |
+
same row (row 0 = the current opening);
|
| 10 |
+
- `h2_sharpa` (H2 + Sharpa, debug/newton/h2_sharpa_policy_eval.py; head, chest): state78 = `observation.state` 75,
|
| 11 |
+
`observation.projected_gravity` 3; action75 = `action.body_target` 31, `action.hands` 44 (absolute targets);
|
| 12 |
+
- `h2_sharpa_planner` (H2 + Sharpa a14 v2, h2_policy_planner_eval.py; head, chest): state78; action82 = action75 +
|
| 13 |
+
`action.planner` 7.
|
| 14 |
+
|
| 15 |
+
Frames: every camera's video is decoded once (PyAV), each frame resized with `resize_frame` (OpenCV INTER_AREA, the
|
| 16 |
+
same function the policy runtime applies to live frames) and stored as a uint8 memory map in a cache directory keyed by
|
| 17 |
+
the dataset, episodes, camera and size. A training sample is the frame t of an episode: the cameras and the state at t,
|
| 18 |
+
and the action rows t..t+horizon-1 (rows past the episode's end repeat its last row, as DextraVerse's windows).
|
| 19 |
+
"""
|
| 20 |
+
from __future__ import annotations
|
| 21 |
+
|
| 22 |
+
from dataclasses import dataclass
|
| 23 |
+
import hashlib
|
| 24 |
+
import json
|
| 25 |
+
import os
|
| 26 |
+
from pathlib import Path
|
| 27 |
+
import sys
|
| 28 |
+
|
| 29 |
+
import numpy as np
|
| 30 |
+
|
| 31 |
+
CACHE_VERSION = 1
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
@dataclass(frozen=True)
|
| 35 |
+
class Contract:
|
| 36 |
+
name: str
|
| 37 |
+
robot: str
|
| 38 |
+
cameras: tuple
|
| 39 |
+
state: tuple # ((column, start, end), ...) concatenated in order
|
| 40 |
+
action: tuple
|
| 41 |
+
action_space: str | None = None # the G1 evaluation interface's action space, if any
|
| 42 |
+
body_dims: int = 0 # leading raw-radian body joint angles of the state (augmentation spec v2 perturbs these)
|
| 43 |
+
|
| 44 |
+
@property
|
| 45 |
+
def state_dim(self) -> int:
|
| 46 |
+
return sum(end - start for _, start, end in self.state)
|
| 47 |
+
|
| 48 |
+
@property
|
| 49 |
+
def action_dim(self) -> int:
|
| 50 |
+
return sum(end - start for _, start, end in self.action)
|
| 51 |
+
|
| 52 |
+
def to_dict(self, cameras=None) -> dict:
|
| 53 |
+
return dict(name=self.name, robot=self.robot, cameras=list(cameras or self.cameras),
|
| 54 |
+
state=[list(s) for s in self.state], action=[list(a) for a in self.action],
|
| 55 |
+
state_dim=self.state_dim, action_dim=self.action_dim, action_space=self.action_space,
|
| 56 |
+
body_dims=self.body_dims)
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
_G1_HANDS = (('observation.inspire_left_hand_state', 0, 6), ('observation.inspire_right_hand_state', 0, 6))
|
| 60 |
+
_H2_STATE = (('observation.state', 0, 75), ('observation.projected_gravity', 0, 3))
|
| 61 |
+
_H2_ACTION = (('action.body_target', 0, 31), ('action.hands', 0, 44))
|
| 62 |
+
# body_dims: G1 observation.state[0:29] are the 29 body joints; H2 observation.state[0:31] are legs 6+6, waist 3,
|
| 63 |
+
# head 2, arms 7+7 (docs/unitree_h2_sharpa.md), then the Sharpa hands.
|
| 64 |
+
CONTRACTS = {c.name: c for c in (
|
| 65 |
+
Contract('g1_sonic_dfx6', 'g1', ('ego_view', 'chest'),
|
| 66 |
+
(('observation.state', 0, 29), *_G1_HANDS, ('observation.projected_gravity', 0, 3)),
|
| 67 |
+
(('action.motion_token', 0, 64), *_G1_HANDS), action_space='sonic_dfx6', body_dims=29),
|
| 68 |
+
Contract('h2_sharpa', 'h2_sharpa', ('head', 'chest'), _H2_STATE, _H2_ACTION, body_dims=31),
|
| 69 |
+
Contract('h2_sharpa_planner', 'h2_sharpa', ('head', 'chest'), _H2_STATE,
|
| 70 |
+
(*_H2_ACTION, ('action.planner', 0, 7)), body_dims=31),
|
| 71 |
+
)}
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
def augmentation_module():
|
| 75 |
+
"""evaluation/augmentation: the augmentation spec v2 shared by every model's training (imported on demand)."""
|
| 76 |
+
evaluation = str(Path(__file__).resolve().parents[1])
|
| 77 |
+
if evaluation not in sys.path:
|
| 78 |
+
sys.path.insert(0, evaluation)
|
| 79 |
+
import augmentation
|
| 80 |
+
return augmentation
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def resize_frame(frame: np.ndarray, hw) -> np.ndarray:
|
| 84 |
+
"""(H, W, 3) uint8 RGB -> (h, w, 3) uint8, OpenCV INTER_AREA (training cache and live frames alike)."""
|
| 85 |
+
import cv2
|
| 86 |
+
frame = np.ascontiguousarray(frame, dtype=np.uint8)
|
| 87 |
+
if frame.ndim != 3 or frame.shape[2] != 3:
|
| 88 |
+
raise ValueError(f'expected an (H, W, 3) RGB frame, got {frame.shape}')
|
| 89 |
+
h, w = int(hw[0]), int(hw[1])
|
| 90 |
+
if frame.shape[:2] == (h, w):
|
| 91 |
+
return frame
|
| 92 |
+
return cv2.resize(frame, (w, h), interpolation=cv2.INTER_AREA)
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
class LeRobotDataset:
|
| 96 |
+
"""A LeRobot v2.1 dataset directory (meta/info.json, meta/episodes.jsonl, data/, videos/)."""
|
| 97 |
+
|
| 98 |
+
def __init__(self, root):
|
| 99 |
+
self.root = Path(root).expanduser().resolve()
|
| 100 |
+
self.info = json.loads((self.root / 'meta/info.json').read_text())
|
| 101 |
+
if self.info.get('codebase_version') != 'v2.1':
|
| 102 |
+
raise ValueError(f"{self.root}: LeRobot {self.info.get('codebase_version')}, expected v2.1")
|
| 103 |
+
rows = [json.loads(line) for line in (self.root / 'meta/episodes.jsonl').read_text().splitlines() if line]
|
| 104 |
+
self.lengths = {int(r['episode_index']): int(r['length']) for r in rows}
|
| 105 |
+
tasks = [json.loads(line) for line in (self.root / 'meta/tasks.jsonl').read_text().splitlines() if line]
|
| 106 |
+
self.tasks = {int(t['task_index']): t['task'] for t in tasks}
|
| 107 |
+
self.fps = float(self.info['fps'])
|
| 108 |
+
|
| 109 |
+
@property
|
| 110 |
+
def name(self) -> str:
|
| 111 |
+
"""The dataset's folder name (its parent's for an export folder named `lerobot`)."""
|
| 112 |
+
return self.root.parent.name if self.root.name == 'lerobot' else self.root.name
|
| 113 |
+
|
| 114 |
+
def chunk(self, episode: int) -> int:
|
| 115 |
+
return episode // int(self.info['chunks_size'])
|
| 116 |
+
|
| 117 |
+
def parquet(self, episode: int) -> Path:
|
| 118 |
+
return self.root / self.info['data_path'].format(episode_chunk=self.chunk(episode), episode_index=episode)
|
| 119 |
+
|
| 120 |
+
def video(self, episode: int, camera: str) -> Path:
|
| 121 |
+
return self.root / self.info['video_path'].format(episode_chunk=self.chunk(episode), episode_index=episode,
|
| 122 |
+
video_key=f'observation.images.{camera}')
|
| 123 |
+
|
| 124 |
+
def check_contract(self, contract: Contract, cameras):
|
| 125 |
+
features = self.info['features']
|
| 126 |
+
for column, start, end in (*contract.state, *contract.action):
|
| 127 |
+
if column not in features:
|
| 128 |
+
raise KeyError(f'{self.root.name}: no column {column!r} (contract {contract.name})')
|
| 129 |
+
width = int(np.prod(features[column]['shape']))
|
| 130 |
+
if end > width:
|
| 131 |
+
raise ValueError(f'{column} has {width} values; the contract reads {start}:{end}')
|
| 132 |
+
for camera in cameras:
|
| 133 |
+
key = f'observation.images.{camera}'
|
| 134 |
+
if features.get(key, {}).get('dtype') != 'video':
|
| 135 |
+
raise KeyError(f'{self.root.name}: no video {key!r}')
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
def parse_episodes(spec: str | None, available) -> list:
|
| 139 |
+
"""'0:100', '0,3,7' or None (all), restricted to the dataset's episodes, sorted."""
|
| 140 |
+
available = sorted(available)
|
| 141 |
+
if not spec:
|
| 142 |
+
return available
|
| 143 |
+
chosen = set()
|
| 144 |
+
for part in spec.split(','):
|
| 145 |
+
if ':' in part:
|
| 146 |
+
lo, hi = part.split(':')
|
| 147 |
+
chosen.update(range(int(lo or 0), int(hi) if hi else available[-1] + 1))
|
| 148 |
+
else:
|
| 149 |
+
chosen.add(int(part))
|
| 150 |
+
missing = sorted(chosen - set(available))
|
| 151 |
+
if missing:
|
| 152 |
+
raise ValueError(f'episodes not in the dataset: {missing[:10]}')
|
| 153 |
+
return sorted(chosen)
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
def load_lowdim(dataset: LeRobotDataset, contract: Contract, episodes) -> dict:
|
| 157 |
+
"""State (N, state_dim) and action (N, action_dim) float32 of the episodes in order, plus each episode's start
|
| 158 |
+
row, length and task text."""
|
| 159 |
+
import pyarrow.parquet as pq
|
| 160 |
+
columns = sorted({c for c, _, _ in (*contract.state, *contract.action)} | {'frame_index', 'task_index'})
|
| 161 |
+
states, actions, starts, lengths, tasks, offset = [], [], [], [], set(), 0
|
| 162 |
+
for episode in episodes:
|
| 163 |
+
table = pq.read_table(dataset.parquet(episode), columns=columns)
|
| 164 |
+
data = {c: np.asarray(table.column(c).to_pylist(), dtype=np.float64) for c in columns}
|
| 165 |
+
n = len(data['frame_index'])
|
| 166 |
+
if n != dataset.lengths[episode] or not np.array_equal(data['frame_index'], np.arange(n)):
|
| 167 |
+
raise ValueError(f'episode {episode}: {n} rows / frame_index differ from episodes.jsonl')
|
| 168 |
+
|
| 169 |
+
def pick(spec):
|
| 170 |
+
return np.concatenate([data[c].reshape(n, -1)[:, s:e] for c, s, e in spec], axis=1).astype(np.float32)
|
| 171 |
+
|
| 172 |
+
states.append(pick(contract.state))
|
| 173 |
+
actions.append(pick(contract.action))
|
| 174 |
+
tasks.update(dataset.tasks[int(i)] for i in np.unique(data['task_index']))
|
| 175 |
+
starts.append(offset)
|
| 176 |
+
lengths.append(n)
|
| 177 |
+
offset += n
|
| 178 |
+
state, action = np.concatenate(states), np.concatenate(actions)
|
| 179 |
+
if not (np.isfinite(state).all() and np.isfinite(action).all()):
|
| 180 |
+
raise ValueError('non-finite state or action values')
|
| 181 |
+
return dict(state=state, action=action, starts=np.asarray(starts), lengths=np.asarray(lengths),
|
| 182 |
+
episodes=list(episodes), tasks=sorted(tasks))
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
def statistics(lowdim: dict, rows: np.ndarray, quantiles: bool = False) -> dict:
|
| 186 |
+
"""min / max / mean / std of state and action over `rows`; with `quantiles` also their q01 / q99 (the ODE
|
| 187 |
+
policies' normalization bounds, as ODE Policy's G1 port fits them)."""
|
| 188 |
+
out = {}
|
| 189 |
+
for key in ('state', 'action'):
|
| 190 |
+
x = lowdim[key][rows].astype(np.float64)
|
| 191 |
+
out[key] = dict(min=x.min(0).tolist(), max=x.max(0).tolist(), mean=x.mean(0).tolist(), std=x.std(0).tolist())
|
| 192 |
+
if quantiles:
|
| 193 |
+
q01, q99 = np.quantile(x, [0.01, 0.99], axis=0)
|
| 194 |
+
out[key].update(q01=q01.tolist(), q99=q99.tolist())
|
| 195 |
+
return out
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
# Columns recorded in physical [0, 1] (the INSPIRE DFX6 openings): the ODE policies normalize them with these fixed
|
| 199 |
+
# bounds instead of the data's, as ODE Policy's G1 port does.
|
| 200 |
+
UNIT_RANGE_COLUMNS = ('observation.inspire_left_hand_state', 'observation.inspire_right_hand_state')
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
def unit_range_dims(contract: Contract) -> dict:
|
| 204 |
+
"""{'state': [...], 'action': [...]}: the positions of the UNIT_RANGE_COLUMNS values in the contract's layouts."""
|
| 205 |
+
out = {}
|
| 206 |
+
for key, spec in (('state', contract.state), ('action', contract.action)):
|
| 207 |
+
dims, offset = [], 0
|
| 208 |
+
for column, start, end in spec:
|
| 209 |
+
if column in UNIT_RANGE_COLUMNS:
|
| 210 |
+
dims.extend(range(offset, offset + end - start))
|
| 211 |
+
offset += end - start
|
| 212 |
+
out[key] = dims
|
| 213 |
+
return out
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
# -- frame cache --------------------------------------------------------------------------------------------------
|
| 217 |
+
def _decode_into(job):
|
| 218 |
+
path, out_path, total, start, length, hw = job
|
| 219 |
+
import av
|
| 220 |
+
frames = np.memmap(out_path, dtype=np.uint8, mode='r+', shape=(total, hw[0], hw[1], 3))
|
| 221 |
+
count = 0
|
| 222 |
+
with av.open(str(path)) as container:
|
| 223 |
+
stream = container.streams.video[0]
|
| 224 |
+
stream.thread_type = 'AUTO'
|
| 225 |
+
for frame in container.decode(stream):
|
| 226 |
+
if count < length:
|
| 227 |
+
frames[start + count] = resize_frame(frame.to_ndarray(format='rgb24'), hw)
|
| 228 |
+
count += 1
|
| 229 |
+
frames.flush()
|
| 230 |
+
del frames
|
| 231 |
+
if count != length:
|
| 232 |
+
raise ValueError(f'{path}: {count} video frames, {length} data rows')
|
| 233 |
+
return length
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
def frame_cache(dataset: LeRobotDataset, lowdim: dict, cameras, hw, cache_root, workers=8) -> dict:
|
| 237 |
+
"""{camera: path of the (N, h, w, 3) uint8 memory map} for the episodes of `lowdim`, decoded once and reused."""
|
| 238 |
+
from multiprocessing import get_context
|
| 239 |
+
total = int(lowdim['lengths'].sum())
|
| 240 |
+
paths = {}
|
| 241 |
+
for camera in cameras:
|
| 242 |
+
key = json.dumps(dict(version=CACHE_VERSION, root=str(dataset.root), episodes=lowdim['episodes'],
|
| 243 |
+
lengths=lowdim['lengths'].tolist(), camera=camera, hw=list(hw)), sort_keys=True)
|
| 244 |
+
digest = hashlib.sha256(key.encode()).hexdigest()[:16]
|
| 245 |
+
folder = Path(cache_root).expanduser() / f'{dataset.name}_{camera}_{hw[0]}x{hw[1]}_{digest}'
|
| 246 |
+
folder.mkdir(parents=True, exist_ok=True)
|
| 247 |
+
out, meta = folder / 'frames.u8', folder / 'meta.json'
|
| 248 |
+
if meta.exists() and json.loads(meta.read_text()).get('complete'):
|
| 249 |
+
paths[camera] = out
|
| 250 |
+
continue
|
| 251 |
+
np.memmap(out, dtype=np.uint8, mode='w+', shape=(total, hw[0], hw[1], 3)).flush()
|
| 252 |
+
jobs = [(dataset.video(e, camera), out, total, int(s), int(n), tuple(hw))
|
| 253 |
+
for e, s, n in zip(lowdim['episodes'], lowdim['starts'], lowdim['lengths'])]
|
| 254 |
+
with get_context('spawn').Pool(max(1, int(workers))) as pool: # the caller may hold torch threads
|
| 255 |
+
for done, _ in enumerate(pool.imap_unordered(_decode_into, jobs), 1):
|
| 256 |
+
if done % 20 == 0 or done == len(jobs):
|
| 257 |
+
print(json.dumps(dict(event='frame_cache', camera=camera, episodes=done, of=len(jobs))),
|
| 258 |
+
flush=True)
|
| 259 |
+
meta.write_text(json.dumps(dict(json.loads(key), frames=total, complete=True), indent=1))
|
| 260 |
+
paths[camera] = out
|
| 261 |
+
return paths
|
| 262 |
+
|
| 263 |
+
|
| 264 |
+
class ChunkDataset:
|
| 265 |
+
"""torch-style dataset of (images (n_cameras, h, w, 3) uint8, state (state_dim,), action (horizon, action_dim))
|
| 266 |
+
over the frames of the selected episodes (positions into lowdim['episodes']). Memory maps open lazily per
|
| 267 |
+
process (DataLoader workers).
|
| 268 |
+
|
| 269 |
+
`body_dims` > 0 turns on the training augmentation (docs/augmentation_v2.md, evaluation/augmentation): per item,
|
| 270 |
+
the cached frames of all cameras get one hb_aug_v2.augment call (one time step, no future targets) and the first
|
| 271 |
+
`body_dims` state values the per-sample joint bias + noise; the action rows are never touched. 0 (evaluation,
|
| 272 |
+
offline checks) returns the cached frames and the recorded state unchanged, deterministically.
|
| 273 |
+
|
| 274 |
+
`lead` > 0 prepends that many rows before t to the action rows (lead + horizon rows, t-lead..t+horizon-1) and
|
| 275 |
+
adds a fourth item, the rows' validity (lead + horizon,) float: 0 for a row before the episode's first or past its
|
| 276 |
+
last (whose values repeat the nearest row); the ODE policies start from the row before t, or from their BOS where
|
| 277 |
+
it is invalid, and leave invalid future rows out of the loss (policies.ODEPolicy).
|
| 278 |
+
|
| 279 |
+
aug_seed (HumanWAM hb_training/REPRODUCIBILITY.md section 3; the training seed, `HB_AUG_SEED`): the augmentation
|
| 280 |
+
random stream is numpy default_rng([aug_seed, torch.initial_seed(), worker id]) per DataLoader worker, so a rerun
|
| 281 |
+
with the same seed, worker count and sampling order draws the same augmentations; None uses the shared worker_rng
|
| 282 |
+
(pid + urandom: not reproducible)."""
|
| 283 |
+
|
| 284 |
+
def __init__(self, lowdim: dict, frames: dict, cameras, hw, horizon: int, positions, body_dims: int = 0,
|
| 285 |
+
lead: int = 0, aug_seed=None):
|
| 286 |
+
self.lowdim, self.paths, self.cameras, self.hw, self.horizon = lowdim, frames, list(cameras), tuple(hw), horizon
|
| 287 |
+
self.positions, self.body_dims, self.lead = list(positions), int(body_dims), int(lead)
|
| 288 |
+
self.aug_seed = aug_seed
|
| 289 |
+
self._rng_key, self._rng_obj = None, None
|
| 290 |
+
if self.body_dims:
|
| 291 |
+
augmentation_module() # asserts the spec version before any worker starts
|
| 292 |
+
self.total = int(lowdim['lengths'].sum())
|
| 293 |
+
index, begin, end = [], np.zeros(self.total, np.int64), np.zeros(self.total, np.int64)
|
| 294 |
+
for p in positions:
|
| 295 |
+
s, n = int(lowdim['starts'][p]), int(lowdim['lengths'][p])
|
| 296 |
+
index.append(np.arange(s, s + n))
|
| 297 |
+
begin[s:s + n] = s
|
| 298 |
+
end[s:s + n] = s + n
|
| 299 |
+
self.index, self.begin, self.end = np.concatenate(index), begin, end
|
| 300 |
+
self._maps, self._pid = None, None
|
| 301 |
+
|
| 302 |
+
def __len__(self):
|
| 303 |
+
return len(self.index)
|
| 304 |
+
|
| 305 |
+
def _frames(self):
|
| 306 |
+
if self._maps is None or self._pid != os.getpid():
|
| 307 |
+
self._maps = {c: np.memmap(self.paths[c], dtype=np.uint8, mode='r', shape=(self.total, *self.hw, 3))
|
| 308 |
+
for c in self.cameras}
|
| 309 |
+
self._pid = os.getpid()
|
| 310 |
+
return self._maps
|
| 311 |
+
|
| 312 |
+
def rows(self, i: int) -> np.ndarray:
|
| 313 |
+
return np.clip(np.arange(i - self.lead, i + self.horizon), self.begin[i], self.end[i] - 1)
|
| 314 |
+
|
| 315 |
+
def valid(self, i: int) -> np.ndarray:
|
| 316 |
+
rows = np.arange(i - self.lead, i + self.horizon)
|
| 317 |
+
return ((rows >= self.begin[i]) & (rows < self.end[i])).astype(np.float32)
|
| 318 |
+
|
| 319 |
+
def plain(self):
|
| 320 |
+
"""The same items without augmentation (the preflight's reference read)."""
|
| 321 |
+
return ChunkDataset(self.lowdim, self.paths, self.cameras, self.hw, self.horizon, self.positions,
|
| 322 |
+
lead=self.lead)
|
| 323 |
+
|
| 324 |
+
def _rng(self):
|
| 325 |
+
if self.aug_seed is None or not self.body_dims:
|
| 326 |
+
return None
|
| 327 |
+
import torch
|
| 328 |
+
info = torch.utils.data.get_worker_info()
|
| 329 |
+
wid = info.id if info is not None else 0
|
| 330 |
+
key = (os.getpid(), wid)
|
| 331 |
+
if self._rng_key != key:
|
| 332 |
+
self._rng_obj = np.random.default_rng([int(self.aug_seed), int(torch.initial_seed()), int(wid)])
|
| 333 |
+
self._rng_key = key
|
| 334 |
+
return self._rng_obj
|
| 335 |
+
|
| 336 |
+
def _observation(self, i: int, rng=None):
|
| 337 |
+
"""The cameras (n_cameras, h, w, 3) uint8 and the state of frame i, augmented when body_dims > 0."""
|
| 338 |
+
import torch
|
| 339 |
+
maps = self._frames()
|
| 340 |
+
images = torch.from_numpy(np.stack([maps[c][i] for c in self.cameras]))
|
| 341 |
+
state = self.lowdim['state'][i]
|
| 342 |
+
if self.body_dims:
|
| 343 |
+
augmentation = augmentation_module()
|
| 344 |
+
images, _ = augmentation.augment_frames_uint8(images, rng=rng)
|
| 345 |
+
state = augmentation.perturb_body(state, self.body_dims, rng=rng)
|
| 346 |
+
return images, torch.from_numpy(np.asarray(state, dtype=np.float32))
|
| 347 |
+
|
| 348 |
+
def __getitem__(self, k):
|
| 349 |
+
import torch
|
| 350 |
+
i = int(self.index[k])
|
| 351 |
+
images, state = self._observation(i, rng=self._rng())
|
| 352 |
+
item = images, state, torch.from_numpy(self.lowdim['action'][self.rows(i)])
|
| 353 |
+
return (*item, torch.from_numpy(self.valid(i))) if self.lead else item
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
class FlashChunkDataset(ChunkDataset):
|
| 357 |
+
"""FLASH training items (evaluation/baselines/flash.py) over every frame of the selected episodes as the anchor:
|
| 358 |
+
(images, state, poly, history, has_history[, dense, dense_valid]).
|
| 359 |
+
|
| 360 |
+
- images, state: the anchor frame's cameras and state44, augmented as ChunkDataset (spec v2) when body_dims > 0;
|
| 361 |
+
- poly (H_ext, action_dim): the action rows at `offsets` frames from the anchor (the polynomial's extended grid,
|
| 362 |
+
`stride` frames apart), clamped to the episode (FLASH's edge padding);
|
| 363 |
+
- history (n_history, action_dim), has_history: flash.history_rows over the `span` executed rows before the anchor
|
| 364 |
+
(rows before the episode start invalid), the same function the adapter applies to past_actions;
|
| 365 |
+
- dense (rows, action_dim), dense_valid: the recorded 30 Hz rows from the anchor (offline check only).
|
| 366 |
+
|
| 367 |
+
aug_seed: as ChunkDataset (the same seeded stream)."""
|
| 368 |
+
|
| 369 |
+
def __init__(self, lowdim, frames, cameras, hw, positions, *, offsets, stride, n_history, rows, body_dims=0,
|
| 370 |
+
aug_seed=None, with_dense=False):
|
| 371 |
+
super().__init__(lowdim, frames, cameras, hw, rows, positions, body_dims=body_dims)
|
| 372 |
+
self.offsets = np.asarray(offsets, dtype=np.int64)
|
| 373 |
+
self.stride, self.n_history, self.n_rows = int(stride), int(n_history), int(rows)
|
| 374 |
+
self.span = (self.n_history - 1) * self.stride + 1
|
| 375 |
+
self.aug_seed, self.with_dense = aug_seed, bool(with_dense)
|
| 376 |
+
start = np.zeros(self.total, np.int64)
|
| 377 |
+
for p in positions:
|
| 378 |
+
s, n = int(lowdim['starts'][p]), int(lowdim['lengths'][p])
|
| 379 |
+
start[s:s + n] = s
|
| 380 |
+
self.start = start
|
| 381 |
+
|
| 382 |
+
def plain(self):
|
| 383 |
+
return FlashChunkDataset(self.lowdim, self.paths, self.cameras, self.hw, self.positions, offsets=self.offsets,
|
| 384 |
+
stride=self.stride, n_history=self.n_history, rows=self.n_rows,
|
| 385 |
+
with_dense=self.with_dense)
|
| 386 |
+
|
| 387 |
+
def __getitem__(self, k):
|
| 388 |
+
import torch
|
| 389 |
+
from .flash import history_rows
|
| 390 |
+
i = int(self.index[k])
|
| 391 |
+
s0, e1 = int(self.start[i]), int(self.end[i])
|
| 392 |
+
images, state = self._observation(i, rng=self._rng())
|
| 393 |
+
action = self.lowdim['action']
|
| 394 |
+
poly = action[np.clip(i + self.offsets, s0, e1 - 1)]
|
| 395 |
+
past = i - self.span + np.arange(self.span)
|
| 396 |
+
history, has = history_rows(action[np.maximum(past, s0)], past >= s0, self.stride, self.n_history)
|
| 397 |
+
out = [images, state, torch.from_numpy(np.ascontiguousarray(poly)), torch.from_numpy(history),
|
| 398 |
+
torch.tensor(bool(has))]
|
| 399 |
+
if self.with_dense:
|
| 400 |
+
idx = i + np.arange(self.n_rows)
|
| 401 |
+
out += [torch.from_numpy(np.ascontiguousarray(action[np.minimum(idx, e1 - 1)])),
|
| 402 |
+
torch.from_numpy(idx < e1)]
|
| 403 |
+
return tuple(out)
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/flash.py
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""FLASH (Bai et al., "FLASH: Efficient Visuomotor Policy via Sparse Sampling", NeurIPS 2026) behind the baselines
|
| 2 |
+
contract: history-to-future polynomial flow matching with a DiT backbone and one Euler step at inference.
|
| 3 |
+
|
| 4 |
+
Ported from NTUMARS/FLASH-Policy @ f47e490 (Apache-2.0): `roboverse_learn/il/policies/flash/flash_policy.py`
|
| 5 |
+
(`FlashDiTImagePolicy`: basis, least-squares and Tikhonov history fits, KKT C1 boundary constraint, loss, sampler),
|
| 6 |
+
`utils/models/flow_net.py` + `policies/dp/models/diffusion/positional_embedding.py` (the DiT and its torchtune RoPE,
|
| 7 |
+
which differs from the DextraVerse RoPE of nets.py), `utils/vision/multi_image_obs_encoder.py` (one ResNet18 per
|
| 8 |
+
camera, GroupNorm, ImageNet normalization of the range-normalized image) and `configs/policy_config/flash.yaml` +
|
| 9 |
+
`configs/train_config/default_train.yaml` (the defaults below). Architecture, initialization and loss are unchanged.
|
| 10 |
+
|
| 11 |
+
What the humanoid interface changes (owner decisions 2026-11-24, recorded in every checkpoint's config):
|
| 12 |
+
|
| 13 |
+
- **Action space and history.** FLASH fits its flow start to the measured history of the action quantity (Franka
|
| 14 |
+
joint positions). The G1 action76 is the SONIC motion token (64, a latent with no measured counterpart) plus the
|
| 15 |
+
measured INSPIRE openings (12). The history is therefore the *executed* action rows - the token sent at each frame
|
| 16 |
+
and the opening measured at it, the interface's `past_actions` - ending one frame before the query (row t-1: the
|
| 17 |
+
token of frame t is what the policy is asked for). Training reads the same dataset rows. `n_history` points at the
|
| 18 |
+
sampling stride; rows before the episode start repeat its first row (FLASH's edge padding); with no row at all (the
|
| 19 |
+
episode's first frame) the flow starts from the zero coefficients, in training as at deployment.
|
| 20 |
+
- **Sampling stride.** The model's points are `stride` dataset frames apart (30 Hz data: stride 2 = 67 ms, the paper's
|
| 21 |
+
4 x 15 ms = 60 ms). Every dataset frame is an anchor (FLASH's converter keeps only every stride-th frame: one phase
|
| 22 |
+
of the same sparse data).
|
| 23 |
+
- **Observation.** The current ego_view and chest frames and state44 condition the DiT (n_obs 1); FLASH's 8-frame
|
| 24 |
+
observation history is not rendered by the benchmark runners. state44 is the low-dim encoder input as agent_pos is.
|
| 25 |
+
- **Output.** The polynomial is evaluated at every 30 Hz frame from the anchor (`rows` rows, row 0 = the query frame),
|
| 26 |
+
the analytic form of FLASH's continuous-time resampling, at exact frame times. FLASH's velocity feed-forward has no
|
| 27 |
+
channel in the interface (SONIC takes tokens) and is not produced.
|
| 28 |
+
- Polynomial fits run in float32 outside autocast (FLASH runs them inside its bf16 autocast); the encoder and the
|
| 29 |
+
DiT run under the trainer's bf16 autocast as upstream.
|
| 30 |
+
- Augmentation spec v2 replaces the native image augmentation (FLASH's random_crop is configured but inert without
|
| 31 |
+
crop_shape).
|
| 32 |
+
"""
|
| 33 |
+
from __future__ import annotations
|
| 34 |
+
|
| 35 |
+
import copy
|
| 36 |
+
|
| 37 |
+
import numpy as np
|
| 38 |
+
import torch
|
| 39 |
+
import torch.nn as nn
|
| 40 |
+
import torch.nn.functional as F
|
| 41 |
+
import torchvision
|
| 42 |
+
|
| 43 |
+
from .nets import IMAGENET_MEAN, IMAGENET_STD, Mlp, SinusoidalPosEmb, replace_batchnorm_with_groupnorm
|
| 44 |
+
|
| 45 |
+
# configs/policy_config/flash.yaml (+ default_runner.yaml horizon 16 / n_obs 8 / n_action 8), owner 2026-11-24 stride 2
|
| 46 |
+
FLASH_DEFAULTS = dict(stride=2, n_history=8, n_action=8, rows=16, poly_order=6, fit_pad=1, boundary_constraint=True,
|
| 47 |
+
poly_prefix=1, poly_suffix=1, history_noise_std=0.5, history_reg_lambda=0.1,
|
| 48 |
+
consistency_weight=1.0, solver='euler')
|
| 49 |
+
# PolicyConfig fields of a FLASH run (flash.yaml + default_train.yaml): DiT 512 x 4 x 8, dropout 0, time embedding
|
| 50 |
+
# 256, one inference step, ResNet18 from scratch with GroupNorm, one per camera
|
| 51 |
+
FLASH_POLICY_FIELDS = dict(hidden_dim=512, num_layers=4, num_heads=8, mlp_ratio=4.0, dropout=0.0, time_embed_dim=256,
|
| 52 |
+
num_inference_steps=1, backbone='resnet18', backbone_weights=None, backbone_norm='group')
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def flash_settings(cfg) -> dict:
|
| 56 |
+
"""The FLASH settings of a PolicyConfig (cfg.extra['flash'] over the defaults); unknown keys are an error."""
|
| 57 |
+
given = dict((cfg.extra or {}).get('flash', {}))
|
| 58 |
+
unknown = sorted(set(given) - set(FLASH_DEFAULTS))
|
| 59 |
+
if unknown:
|
| 60 |
+
raise KeyError(f'unknown FLASH settings {unknown}; known: {sorted(FLASH_DEFAULTS)}')
|
| 61 |
+
out = dict(FLASH_DEFAULTS, **given)
|
| 62 |
+
if out['solver'] not in ('euler', 'midpoint'):
|
| 63 |
+
raise ValueError(f"solver {out['solver']!r}")
|
| 64 |
+
if out['poly_prefix'] is None or int(out['poly_prefix']) < 0:
|
| 65 |
+
raise ValueError('this port implements poly_prefix >= 0 (flash.yaml: 1)')
|
| 66 |
+
return out
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
# --- networks: utils/models/flow_net.py and positional_embedding.py of FLASH-Policy ------------------------------
|
| 70 |
+
class RotaryPosEmbFlash(nn.Module):
|
| 71 |
+
"""torchtune RoPE as FLASH builds it: `dim` = the model width, its dim/2 frequencies split over the heads, pairs
|
| 72 |
+
interleaved (x[..., 0::2], x[..., 1::2])."""
|
| 73 |
+
|
| 74 |
+
def __init__(self, dim: int, max_seq_len: int = 256, base: int = 10_000):
|
| 75 |
+
super().__init__()
|
| 76 |
+
self.dim, self.base, self.max_seq_len = dim, base, max_seq_len
|
| 77 |
+
theta = 1.0 / (base ** (torch.arange(0, dim, 2)[: (dim // 2)].float() / dim))
|
| 78 |
+
self.register_buffer('theta', theta, persistent=False)
|
| 79 |
+
seq_idx = torch.arange(max_seq_len, dtype=theta.dtype)
|
| 80 |
+
idx_theta = torch.einsum('i, j -> ij', seq_idx, theta).float()
|
| 81 |
+
self.register_buffer('cache', torch.stack([torch.cos(idx_theta), torch.sin(idx_theta)], dim=-1),
|
| 82 |
+
persistent=False)
|
| 83 |
+
|
| 84 |
+
def forward(self, x): # x: (B, heads, S, head_dim)
|
| 85 |
+
x = x.permute(0, 2, 1, 3)
|
| 86 |
+
B, S, heads, head_dim = x.size()
|
| 87 |
+
rope = self.cache[:S].view(1, S, heads, head_dim // 2, 2)
|
| 88 |
+
xs = x.float().reshape(*x.shape[:-1], head_dim // 2, 2)
|
| 89 |
+
out = torch.stack([xs[..., 0] * rope[..., 0] - xs[..., 1] * rope[..., 1],
|
| 90 |
+
xs[..., 1] * rope[..., 0] + xs[..., 0] * rope[..., 1]], -1)
|
| 91 |
+
return out.flatten(3).permute(0, 2, 1, 3).type_as(x)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
class FlashAttention(nn.Module):
|
| 95 |
+
def __init__(self, dim, num_heads=8, qkv_bias=True, attn_drop=0.0, proj_drop=0.0, max_seq_len=256, qk_norm=True):
|
| 96 |
+
super().__init__()
|
| 97 |
+
assert dim % num_heads == 0, 'dim should be divisible by num_heads'
|
| 98 |
+
self.num_heads, self.head_dim = num_heads, dim // num_heads
|
| 99 |
+
self.attn_drop = attn_drop
|
| 100 |
+
self.proj_drop = nn.Dropout(proj_drop)
|
| 101 |
+
self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
|
| 102 |
+
self.q_norm = nn.LayerNorm(self.head_dim) if qk_norm else nn.Identity()
|
| 103 |
+
self.k_norm = nn.LayerNorm(self.head_dim) if qk_norm else nn.Identity()
|
| 104 |
+
self.proj = nn.Linear(dim, dim)
|
| 105 |
+
self.rope = RotaryPosEmbFlash(dim, max_seq_len=max_seq_len)
|
| 106 |
+
|
| 107 |
+
def forward(self, x):
|
| 108 |
+
B, S, C = x.shape
|
| 109 |
+
q, k, v = self.qkv(x).reshape(B, S, 3, self.num_heads, self.head_dim).permute(2, 0, 3, 1, 4).unbind(0)
|
| 110 |
+
q, k = self.rope(self.q_norm(q)), self.rope(self.k_norm(k))
|
| 111 |
+
x = F.scaled_dot_product_attention(q, k, v, dropout_p=self.attn_drop if self.training else 0.0)
|
| 112 |
+
return self.proj_drop(self.proj(x.transpose(1, 2).reshape(B, S, C)))
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
class FlashAdaLNBlock(nn.Module):
|
| 116 |
+
def __init__(self, dim, num_heads, mlp_ratio=4.0, dropout=0.0, max_seq_len=256):
|
| 117 |
+
super().__init__()
|
| 118 |
+
self.norm1 = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
| 119 |
+
self.attn = FlashAttention(dim, num_heads=num_heads, attn_drop=dropout, proj_drop=dropout,
|
| 120 |
+
max_seq_len=max_seq_len)
|
| 121 |
+
self.norm2 = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
| 122 |
+
self.mlp = Mlp(in_features=dim, hidden_features=int(dim * mlp_ratio),
|
| 123 |
+
act_layer=lambda: nn.GELU(approximate='tanh'), drop=0)
|
| 124 |
+
self.ada_ln = nn.Sequential(nn.SiLU(), nn.Linear(dim, 6 * dim))
|
| 125 |
+
self.dim = dim
|
| 126 |
+
nn.init.constant_(self.ada_ln[-1].weight, 0)
|
| 127 |
+
nn.init.constant_(self.ada_ln[-1].bias, 0)
|
| 128 |
+
|
| 129 |
+
def forward(self, x, t, c):
|
| 130 |
+
B = x.shape[0]
|
| 131 |
+
gamma1, gamma2, scale1, scale2, shift1, shift2 = self.ada_ln(F.silu(t + c)).view(B, 6, 1, self.dim).unbind(1)
|
| 132 |
+
x = x + self.attn(self.norm1(x).mul(scale1.add(1)).add_(shift1)).mul_(gamma1)
|
| 133 |
+
return x + self.mlp(self.norm2(x).mul(scale2.add(1)).add_(shift2)).mul_(gamma2)
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
class FlashFlowTransformer(nn.Module):
|
| 137 |
+
"""FLASH's FlowTransformer: AdaLN DiT over the C coefficient rows (tokens of width action_dim)."""
|
| 138 |
+
|
| 139 |
+
def __init__(self, input_dim, condition_dim, hidden_dim, output_dim, num_layers, num_heads, mlp_ratio=4.0,
|
| 140 |
+
dropout=0.1, time_embed_dim=256, max_seq_len=256):
|
| 141 |
+
super().__init__()
|
| 142 |
+
self.input_proj = nn.Linear(input_dim, hidden_dim)
|
| 143 |
+
self.time_embed = nn.Sequential(SinusoidalPosEmb(time_embed_dim), nn.Linear(time_embed_dim, time_embed_dim * 4),
|
| 144 |
+
nn.Mish(), nn.Linear(time_embed_dim * 4, hidden_dim))
|
| 145 |
+
self.cond_embed = nn.Linear(condition_dim, hidden_dim)
|
| 146 |
+
self.transformer_blocks = nn.ModuleList(
|
| 147 |
+
[FlashAdaLNBlock(hidden_dim, num_heads, mlp_ratio=mlp_ratio, dropout=dropout, max_seq_len=max_seq_len)
|
| 148 |
+
for _ in range(num_layers)])
|
| 149 |
+
self.norm = nn.LayerNorm(hidden_dim)
|
| 150 |
+
self.out_proj = nn.Linear(hidden_dim, output_dim)
|
| 151 |
+
|
| 152 |
+
def basic_init(module):
|
| 153 |
+
if isinstance(module, nn.Linear):
|
| 154 |
+
nn.init.xavier_uniform_(module.weight)
|
| 155 |
+
if module.bias is not None:
|
| 156 |
+
nn.init.constant_(module.bias, 0)
|
| 157 |
+
|
| 158 |
+
self.apply(basic_init)
|
| 159 |
+
nn.init.normal_(self.time_embed[1].weight, std=0.02)
|
| 160 |
+
nn.init.normal_(self.time_embed[3].weight, std=0.02)
|
| 161 |
+
|
| 162 |
+
def forward(self, x, t, global_cond):
|
| 163 |
+
if not torch.is_tensor(t):
|
| 164 |
+
t = torch.tensor(t, device=x.device)
|
| 165 |
+
if t.ndim == 0:
|
| 166 |
+
t = t.expand(x.shape[0])
|
| 167 |
+
x = self.input_proj(x)
|
| 168 |
+
t = self.time_embed(t)
|
| 169 |
+
c = self.cond_embed(global_cond)
|
| 170 |
+
for block in self.transformer_blocks:
|
| 171 |
+
x = block(x, t, c)
|
| 172 |
+
return self.out_proj(self.norm(x))
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
class FlashObsEncoder(nn.Module):
|
| 176 |
+
"""FLASH's MultiImageObsEncoder (share_rgb_model False, use_group_norm, imagenet_norm, no resize / crop): one
|
| 177 |
+
torchvision ResNet (classifier removed) per camera, every copy deep-copied from one initialization, BatchNorm
|
| 178 |
+
replaced by GroupNorm(C // 16) after the copy; each [0, 1] image goes through FLASH's range normalizer (x 2 - 1)
|
| 179 |
+
and then torchvision's ImageNet Normalize, as upstream composes them. Output: the cameras' pooled features in the
|
| 180 |
+
contract's camera order, then the normalized state. (B, n_cameras * 512 + state_dim)."""
|
| 181 |
+
|
| 182 |
+
def __init__(self, n_cameras, state_dim, backbone='resnet18', weights=None):
|
| 183 |
+
super().__init__()
|
| 184 |
+
base = getattr(torchvision.models, backbone)(weights=weights)
|
| 185 |
+
base.fc = nn.Identity()
|
| 186 |
+
self.rgb = nn.ModuleList([replace_batchnorm_with_groupnorm(copy.deepcopy(base)) for _ in range(n_cameras)])
|
| 187 |
+
self.n_cameras, self.state_dim = int(n_cameras), int(state_dim)
|
| 188 |
+
self.register_buffer('mean', torch.tensor(IMAGENET_MEAN).view(1, 3, 1, 1), persistent=False)
|
| 189 |
+
self.register_buffer('std', torch.tensor(IMAGENET_STD).view(1, 3, 1, 1), persistent=False)
|
| 190 |
+
self.feature_dim = self.n_cameras * (512 if backbone in ('resnet18', 'resnet34') else 2048) + self.state_dim
|
| 191 |
+
|
| 192 |
+
def forward(self, images, state):
|
| 193 |
+
"""images (B, n_cameras, 3, H, W) in [0, 1]; state (B, state_dim) normalized."""
|
| 194 |
+
x = images * 2.0 - 1.0 # get_image_range_normalizer: [0, 1] -> [-1, 1]
|
| 195 |
+
feats = [net((x[:, i] - self.mean) / self.std) for i, net in enumerate(self.rgb)]
|
| 196 |
+
return torch.cat([*feats, state], dim=-1)
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
# --- the policy ---------------------------------------------------------------------------------------------------
|
| 200 |
+
def legendre_basis(s: torch.Tensor, degree: int):
|
| 201 |
+
"""Shifted Legendre basis on s in [0, 1] and its first / second derivatives (FLASH's _build_legendre_basis)."""
|
| 202 |
+
x = 2 * s - 1
|
| 203 |
+
H, C = len(s), degree + 1
|
| 204 |
+
P = torch.zeros(H, C, dtype=s.dtype)
|
| 205 |
+
dP = torch.zeros(H, C, dtype=s.dtype)
|
| 206 |
+
d2P = torch.zeros(H, C, dtype=s.dtype)
|
| 207 |
+
P[:, 0] = 1.0
|
| 208 |
+
if C > 1:
|
| 209 |
+
P[:, 1] = x
|
| 210 |
+
dP[:, 1] = 1.0
|
| 211 |
+
for n in range(1, C - 1):
|
| 212 |
+
P[:, n + 1] = ((2 * n + 1) * x * P[:, n] - n * P[:, n - 1]) / (n + 1)
|
| 213 |
+
dP[:, n + 1] = ((2 * n + 1) * (P[:, n] + x * dP[:, n]) - n * dP[:, n - 1]) / (n + 1)
|
| 214 |
+
d2P[:, n + 1] = ((2 * n + 1) * (2 * dP[:, n] + x * d2P[:, n]) - n * d2P[:, n - 1]) / (n + 1)
|
| 215 |
+
return P, 2 * dP, 4 * d2P
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
def history_rows(rows, valid, stride: int, n_history: int):
|
| 219 |
+
"""The FLASH history of one query from its executed rows.
|
| 220 |
+
|
| 221 |
+
rows (N, D) and valid (N,): consecutive frames ending at the frame before the query (row N - 1 = t - 1), a valid
|
| 222 |
+
contiguous suffix (the interface's past_actions / history_valid; the dataset's rows before an anchor). Returns
|
| 223 |
+
(history (n_history, D) float32 at frames t-1-(n_history-1-j)*stride, has_history bool): a point before the first
|
| 224 |
+
valid row repeats that row (FLASH's edge padding); with no valid row has_history is False (zero start)."""
|
| 225 |
+
rows = np.asarray(rows, dtype=np.float32)
|
| 226 |
+
valid = np.asarray(valid, dtype=bool).reshape(-1)
|
| 227 |
+
span = (n_history - 1) * stride + 1
|
| 228 |
+
if len(rows) < span or len(valid) != len(rows):
|
| 229 |
+
raise ValueError(f'need >= {span} history rows (stride {stride} x {n_history} points), got {rows.shape}')
|
| 230 |
+
if not valid.any():
|
| 231 |
+
return np.zeros((n_history, rows.shape[1]), np.float32), False
|
| 232 |
+
first = int(np.argmax(valid))
|
| 233 |
+
if not valid[first:].all():
|
| 234 |
+
raise ValueError('history_valid must be a contiguous suffix')
|
| 235 |
+
idx = len(rows) - 1 - (n_history - 1 - np.arange(n_history)) * stride
|
| 236 |
+
return rows[np.maximum(idx, first)].copy(), True
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
class FlashPolicy(nn.Module):
|
| 240 |
+
"""FLASH (FlashDiTImagePolicy) on the baselines contract.
|
| 241 |
+
|
| 242 |
+
Training: compute_loss(images, state, poly, history, has_history) with poly (B, H_ext, Da) the physical action
|
| 243 |
+
rows at the polynomial's extended grid (anchor index fit_pad + poly_prefix, `stride` frames apart, clamped at the
|
| 244 |
+
episode's ends), history (B, n_history, Da) from history_rows. Inference: predict(images, state, history,
|
| 245 |
+
has_history) -> the physical (B, rows, Da) chunk at 30 Hz from the query frame, and the normalized coefficients."""
|
| 246 |
+
name = 'flash'
|
| 247 |
+
backbone_prefix = 'obs_encoder.rgb.'
|
| 248 |
+
|
| 249 |
+
def __init__(self, cfg, init_weights=None):
|
| 250 |
+
super().__init__()
|
| 251 |
+
from .policies import Normalizer
|
| 252 |
+
self.cfg = cfg
|
| 253 |
+
self.state_norm = Normalizer(cfg.state_dim)
|
| 254 |
+
self.action_norm = Normalizer(cfg.action_dim)
|
| 255 |
+
f = self.flash = flash_settings(cfg)
|
| 256 |
+
self.stride, self.n_history, self.n_action = int(f['stride']), int(f['n_history']), int(f['n_action'])
|
| 257 |
+
self.rows, self.poly_order, self.fit_pad = int(f['rows']), int(f['poly_order']), int(f['fit_pad'])
|
| 258 |
+
self.prefix, self.suffix = int(f['poly_prefix']), int(f['poly_suffix'])
|
| 259 |
+
self.boundary_constraint = bool(f['boundary_constraint'])
|
| 260 |
+
self.history_noise_std = float(f['history_noise_std'])
|
| 261 |
+
self.history_reg_lambda = float(f['history_reg_lambda'])
|
| 262 |
+
self.consistency_weight = float(f['consistency_weight'])
|
| 263 |
+
self.solver = f['solver']
|
| 264 |
+
if cfg.horizon != self.rows:
|
| 265 |
+
raise ValueError(f'PolicyConfig.horizon {cfg.horizon} must equal the FLASH output rows {self.rows}')
|
| 266 |
+
C = self.num_coeff = self.poly_order + 1
|
| 267 |
+
H_poly = self.H_poly = self.prefix + self.n_action + self.suffix
|
| 268 |
+
H_ext = self.H_ext = H_poly + 2 * self.fit_pad
|
| 269 |
+
self.anchor = self.fit_pad + self.prefix # anchor index in the extended grid
|
| 270 |
+
last_dense = (self.rows - 1) / self.stride
|
| 271 |
+
if self.prefix + last_dense > H_poly - 1 + 1e-9:
|
| 272 |
+
raise ValueError(f'{self.rows} rows at stride {self.stride} reach past the fitted polynomial')
|
| 273 |
+
|
| 274 |
+
s_ext = torch.linspace(0.0, 1.0, H_ext, dtype=torch.float64)
|
| 275 |
+
s_mid = s_ext[self.fit_pad:self.fit_pad + H_poly] if self.fit_pad > 0 else s_ext
|
| 276 |
+
eval_ext, d1_ext, _ = legendre_basis(s_ext, self.poly_order)
|
| 277 |
+
StS = eval_ext.T @ eval_ext
|
| 278 |
+
lstsq = torch.linalg.solve(StS, eval_ext.T)
|
| 279 |
+
eval_mid, _, _ = legendre_basis(s_mid, self.poly_order)
|
| 280 |
+
coeff_scale = torch.norm(lstsq, dim=1).clamp(min=1e-8)
|
| 281 |
+
self.register_buffer('_lstsq_matrix', lstsq.float())
|
| 282 |
+
self.register_buffer('_coeff_scale', coeff_scale.float().view(1, -1, 1))
|
| 283 |
+
# history fit (flash_policy.py, poly_prefix branch): the first n_history rows of the core grid, Tikhonov
|
| 284 |
+
S_hist = eval_mid.double() if H_poly == self.n_history else eval_mid[:self.n_history, :].double()
|
| 285 |
+
StS_hist = S_hist.T @ S_hist
|
| 286 |
+
if self.history_reg_lambda > 0:
|
| 287 |
+
StS_hist = StS_hist + self.history_reg_lambda * torch.eye(C, dtype=torch.float64)
|
| 288 |
+
self.register_buffer('_history_lstsq_matrix', torch.linalg.solve(StS_hist, S_hist.T).float())
|
| 289 |
+
if self.boundary_constraint: # KKT C1 at the execution start and the next window's start
|
| 290 |
+
idx = [self.fit_pad + self.prefix, self.fit_pad + self.prefix + self.n_action]
|
| 291 |
+
if idx[1] >= H_ext:
|
| 292 |
+
raise ValueError(f'bc_overlap {idx[1]} >= H_ext {H_ext}: increase fit_pad')
|
| 293 |
+
A_pos, A_vel = eval_ext[idx, :], d1_ext[idx, :]
|
| 294 |
+
A = torch.cat([A_pos, A_vel], dim=0)
|
| 295 |
+
StS_inv_AT = torch.linalg.solve(StS, torch.eye(C, dtype=torch.float64)) @ A.T
|
| 296 |
+
self.register_buffer('_bc_eval_pos', A_pos.float())
|
| 297 |
+
self.register_buffer('_bc_eval_vel', A_vel.float())
|
| 298 |
+
self.register_buffer('_bc_correction', (StS_inv_AT @ torch.linalg.inv(A @ StS_inv_AT)).float())
|
| 299 |
+
self.register_buffer('_bc_pos_indices', torch.tensor(idx, dtype=torch.long))
|
| 300 |
+
# the 30 Hz output rows: frame k after the anchor sits at grid index anchor + k / stride
|
| 301 |
+
s_dense = torch.tensor([(self.anchor + k / self.stride) / (H_ext - 1) for k in range(self.rows)],
|
| 302 |
+
dtype=torch.float64)
|
| 303 |
+
self.register_buffer('_dense_eval_matrix', legendre_basis(s_dense, self.poly_order)[0].float())
|
| 304 |
+
|
| 305 |
+
self.obs_encoder = FlashObsEncoder(cfg.n_cameras, cfg.state_dim, backbone=cfg.backbone, weights=init_weights)
|
| 306 |
+
self.model = FlashFlowTransformer(input_dim=cfg.action_dim, condition_dim=self.obs_encoder.feature_dim,
|
| 307 |
+
hidden_dim=cfg.hidden_dim, output_dim=cfg.action_dim,
|
| 308 |
+
num_layers=cfg.num_layers, num_heads=cfg.num_heads, mlp_ratio=cfg.mlp_ratio,
|
| 309 |
+
dropout=cfg.dropout, time_embed_dim=cfg.time_embed_dim)
|
| 310 |
+
|
| 311 |
+
def fit_normalizers(self, stats: dict):
|
| 312 |
+
self.state_norm.fit(stats['state']['min'], stats['state']['max'])
|
| 313 |
+
self.action_norm.fit(stats['action']['min'], stats['action']['max'])
|
| 314 |
+
|
| 315 |
+
@property
|
| 316 |
+
def sampling_steps(self) -> int:
|
| 317 |
+
return int(self.cfg.num_inference_steps or 1)
|
| 318 |
+
|
| 319 |
+
@property
|
| 320 |
+
def history_span(self) -> int:
|
| 321 |
+
"""Executed rows a query needs: (n_history - 1) * stride + 1."""
|
| 322 |
+
return (self.n_history - 1) * self.stride + 1
|
| 323 |
+
|
| 324 |
+
def extended_offsets(self) -> np.ndarray:
|
| 325 |
+
"""Frame offsets from the anchor of the extended polynomial grid (for the training targets)."""
|
| 326 |
+
return (np.arange(self.H_ext) - self.anchor) * self.stride
|
| 327 |
+
|
| 328 |
+
# polynomial operations, float32 and outside autocast ----------------------------------------------------------
|
| 329 |
+
def _to_coeff(self, traj_n):
|
| 330 |
+
return torch.einsum('ch,bhd->bcd', self._lstsq_matrix, traj_n) / self._coeff_scale
|
| 331 |
+
|
| 332 |
+
def _history_coeff(self, history, has_history):
|
| 333 |
+
with torch.autocast(history.device.type, enabled=False):
|
| 334 |
+
h = torch.einsum('ch,bhd->bcd', self._history_lstsq_matrix, self.action_norm.normalize(history.float()))
|
| 335 |
+
h = h / self._coeff_scale
|
| 336 |
+
return torch.where(has_history.view(-1, 1, 1).bool(), h, torch.zeros_like(h))
|
| 337 |
+
|
| 338 |
+
def _apply_boundary_constraint(self, norm_coeff, traj_n):
|
| 339 |
+
raw = norm_coeff * self._coeff_scale
|
| 340 |
+
idx, H = self._bc_pos_indices, traj_n.shape[1]
|
| 341 |
+
cur_pos = torch.einsum('kc,bcd->bkd', self._bc_eval_pos, raw)
|
| 342 |
+
tgt_pos = traj_n[:, idx, :]
|
| 343 |
+
vel = []
|
| 344 |
+
for i in idx.tolist():
|
| 345 |
+
if i + 1 < H:
|
| 346 |
+
v = (traj_n[:, i + 1] - traj_n[:, i - 1]) * (H - 1) / 2
|
| 347 |
+
elif i >= 2:
|
| 348 |
+
v = (3 * traj_n[:, i] - 4 * traj_n[:, i - 1] + traj_n[:, i - 2]) * (H - 1) / 2
|
| 349 |
+
else:
|
| 350 |
+
v = (traj_n[:, i] - traj_n[:, i - 1]) * (H - 1)
|
| 351 |
+
vel.append(v)
|
| 352 |
+
tgt_vel = torch.stack(vel, dim=1)
|
| 353 |
+
cur_vel = torch.einsum('kc,bcd->bkd', self._bc_eval_vel, raw)
|
| 354 |
+
residual = torch.cat([cur_pos - tgt_pos, cur_vel - tgt_vel], dim=1)
|
| 355 |
+
return (raw - torch.einsum('ck,bkd->bcd', self._bc_correction, residual)) / self._coeff_scale
|
| 356 |
+
|
| 357 |
+
def target_coeff(self, poly):
|
| 358 |
+
with torch.autocast(poly.device.type, enabled=False):
|
| 359 |
+
traj_n = self.action_norm.normalize(poly.float())
|
| 360 |
+
coeff = self._to_coeff(traj_n)
|
| 361 |
+
if self.boundary_constraint:
|
| 362 |
+
coeff = self._apply_boundary_constraint(coeff, traj_n)
|
| 363 |
+
return coeff
|
| 364 |
+
|
| 365 |
+
def dense_from_coeff(self, norm_coeff):
|
| 366 |
+
"""(B, rows, Da) physical actions at the 30 Hz frames from the anchor."""
|
| 367 |
+
with torch.autocast(norm_coeff.device.type, enabled=False):
|
| 368 |
+
raw = norm_coeff.float() * self._coeff_scale
|
| 369 |
+
return self.action_norm.unnormalize(torch.einsum('hc,bcd->bhd', self._dense_eval_matrix, raw))
|
| 370 |
+
|
| 371 |
+
def condition(self, images, state):
|
| 372 |
+
return self.obs_encoder(images, self.state_norm.normalize(state))
|
| 373 |
+
|
| 374 |
+
# training and inference ------------------------------------------------------------------------------------------
|
| 375 |
+
def compute_loss(self, images, state, poly, history, has_history):
|
| 376 |
+
target = self.target_coeff(poly)
|
| 377 |
+
hist = self._history_coeff(history, has_history)
|
| 378 |
+
if self.training and self.history_noise_std > 0:
|
| 379 |
+
hist = hist + torch.randn_like(hist) * self.history_noise_std
|
| 380 |
+
cond = self.condition(images, state)
|
| 381 |
+
t = torch.rand(target.shape[0], device=target.device)
|
| 382 |
+
te = t.view(-1, 1, 1)
|
| 383 |
+
x_t = (1 - te) * hist + te * target
|
| 384 |
+
loss_fm = F.mse_loss(self.model(x_t, t, cond).float(), target - hist)
|
| 385 |
+
loss, metrics = loss_fm, dict(fm=float(loss_fm.detach()))
|
| 386 |
+
if self.consistency_weight > 0:
|
| 387 |
+
v0 = self.model(hist, torch.zeros_like(t), cond).float()
|
| 388 |
+
loss_c = F.mse_loss(hist + v0, target)
|
| 389 |
+
loss = loss + self.consistency_weight * loss_c
|
| 390 |
+
metrics['consistency'] = float(loss_c.detach())
|
| 391 |
+
return loss, metrics
|
| 392 |
+
|
| 393 |
+
@torch.no_grad()
|
| 394 |
+
def predict_coeff(self, images, state, history, has_history):
|
| 395 |
+
cond = self.condition(images, state)
|
| 396 |
+
x = self._history_coeff(history, has_history)
|
| 397 |
+
times = torch.linspace(0, 1.0, self.sampling_steps + 1)
|
| 398 |
+
for i in range(self.sampling_steps):
|
| 399 |
+
t0 = times[i].view(1).expand(x.shape[0]).to(x.device)
|
| 400 |
+
t1 = times[i + 1].view(1).expand(x.shape[0]).to(x.device)
|
| 401 |
+
dt = (t1 - t0).view(-1, 1, 1)
|
| 402 |
+
if self.solver == 'euler':
|
| 403 |
+
x = x + dt * self.model(x, t0, cond).float()
|
| 404 |
+
else:
|
| 405 |
+
x_mid = x + self.model(x, t0, cond).float() * dt / 2
|
| 406 |
+
x = x + dt * self.model(x_mid, t0 + (t1 - t0) / 2, cond).float()
|
| 407 |
+
return x
|
| 408 |
+
|
| 409 |
+
@torch.no_grad()
|
| 410 |
+
def predict(self, images, state, history, has_history, generator=None): # noqa: ARG002 - deterministic
|
| 411 |
+
coeff = self.predict_coeff(images, state, history, has_history)
|
| 412 |
+
return self.dense_from_coeff(coeff), coeff
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/inloop.py
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""In-training open-loop action MSE of the baselines (owner 2026-11-22: every training of every model measures it while
|
| 2 |
+
it trains; HumanWAM `hb_training/REPRODUCIBILITY.md` section 6).
|
| 3 |
+
|
| 4 |
+
The protocol code is HumanWAM's `hb_training/eval-action-mse` (`hb_inloop_core.InLoop` and `hb_eval_common`), used
|
| 5 |
+
unmodified from the directory given to train.py as --inloop-code; its cache lives under $HB_EVAL_CACHE (default
|
| 6 |
+
$G/eval-action-mse/cache) and is built by its `build_cache.py <task> train10`. Per evaluation: the queries every 16
|
| 7 |
+
frames of the task's `heldout` episodes (`train10` when it has none), the first 16 predicted rows against the
|
| 8 |
+
recorded ones, nMSE over the training-frame std (constant dims excluded), batches of 8 queries seeded
|
| 9 |
+
1234 + 1000 rank + batch index, every HB_INLOOP_EVERY (250) steps; one json line per evaluation in
|
| 10 |
+
<run>/logs/inloop-mse.jsonl and `HB_INLOOP` lines in the log. Training RNG and module modes are restored after each.
|
| 11 |
+
|
| 12 |
+
The evaluated weights are the ones the run saves (the EMA). Inputs as at deployment: each camera resized like the
|
| 13 |
+
training cache (data.resize_frame), state44, and for FLASH the cached past actions (the up to 16 recorded rows before
|
| 14 |
+
the query: the eval protocol's `past_action`) through the same history rule as the adapter (runtime.BaselinePolicy).
|
| 15 |
+
Before the first step the cache is checked against the run's data: the cached state and action rows of every cached
|
| 16 |
+
episode that the run loaded must equal the run's rows bit for bit.
|
| 17 |
+
"""
|
| 18 |
+
from __future__ import annotations
|
| 19 |
+
|
| 20 |
+
import os
|
| 21 |
+
from pathlib import Path
|
| 22 |
+
import sys
|
| 23 |
+
|
| 24 |
+
import numpy as np
|
| 25 |
+
|
| 26 |
+
from .data import resize_frame
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def install(code_dir, task, run_dir, get_model, contract, cameras, hw, lowdim, policy_name, lowdim_loader=None):
|
| 30 |
+
"""The InLoop object of this run (its evaluate(step, model) is called by train.py), after the cache check."""
|
| 31 |
+
code_dir = Path(code_dir).expanduser().resolve()
|
| 32 |
+
if not (code_dir / 'hb_inloop_core.py').exists():
|
| 33 |
+
raise FileNotFoundError(f'{code_dir}: no hb_inloop_core.py (HumanWAM hb_training/eval-action-mse)')
|
| 34 |
+
if str(code_dir) not in sys.path:
|
| 35 |
+
sys.path.insert(0, str(code_dir))
|
| 36 |
+
import hb_inloop_core as core
|
| 37 |
+
E = core.E
|
| 38 |
+
if core.EVERY <= 0:
|
| 39 |
+
print(f'HB_INLOOP {policy_name} disabled: HB_INLOOP_EVERY={core.EVERY}', flush=True)
|
| 40 |
+
return None
|
| 41 |
+
if task not in E.TASKS:
|
| 42 |
+
raise KeyError(f'task {task!r} is not registered in {code_dir}/hb_eval_common.py TASKS')
|
| 43 |
+
split = core.pick_split(task)
|
| 44 |
+
meta = E.load_meta(task, split)
|
| 45 |
+
lay = E.LAYOUTS[meta['layout']]
|
| 46 |
+
if (lay['state_dim'], lay['action_dim']) != (contract.state_dim, contract.action_dim):
|
| 47 |
+
raise ValueError(f"eval layout {meta['layout']} {lay['state_dim']}/{lay['action_dim']} vs contract "
|
| 48 |
+
f'{contract.name} {contract.state_dim}/{contract.action_dim}')
|
| 49 |
+
missing = [c for c in cameras if c not in meta['cams']]
|
| 50 |
+
if missing:
|
| 51 |
+
raise KeyError(f"cameras {missing} not in the eval cache {meta['cams']}")
|
| 52 |
+
def check(rows, what):
|
| 53 |
+
done = []
|
| 54 |
+
for ep in meta['episodes']: # the cache holds this run's data
|
| 55 |
+
if ep not in rows['episodes']:
|
| 56 |
+
continue
|
| 57 |
+
p = rows['episodes'].index(ep)
|
| 58 |
+
s, n = int(rows['starts'][p]), int(rows['lengths'][p])
|
| 59 |
+
with np.load(E.split_dir(task, split) / f'ep_{ep:06d}.npz') as z:
|
| 60 |
+
same = (np.array_equal(z['state'], rows['state'][s:s + n])
|
| 61 |
+
and np.array_equal(z['action'], rows['action'][s:s + n]))
|
| 62 |
+
if not same:
|
| 63 |
+
raise ValueError(f'eval cache {task}/{split} episode {ep} differs from {what} '
|
| 64 |
+
f'(cache source {meta.get("source")})')
|
| 65 |
+
done.append(ep)
|
| 66 |
+
return done
|
| 67 |
+
|
| 68 |
+
checked = check(lowdim, 'the training data')
|
| 69 |
+
if not checked and lowdim_loader is not None:
|
| 70 |
+
# a held-out split: its episodes are not trained on, so they are checked against the same dataset read
|
| 71 |
+
# through the same contract (2026-11-24, B7 black lead-drop b7td: train 0-99, held out 100-106)
|
| 72 |
+
checked = check(lowdim_loader(list(meta['episodes'])), "this run's dataset (held-out episodes)")
|
| 73 |
+
if not checked:
|
| 74 |
+
raise ValueError(f'no cached episode of {task}/{split} is in this run\'s data: cannot check the cache')
|
| 75 |
+
|
| 76 |
+
import torch
|
| 77 |
+
|
| 78 |
+
def predict(batch, seed):
|
| 79 |
+
model = get_model()
|
| 80 |
+
device = next(model.parameters()).device
|
| 81 |
+
frames = np.stack([np.stack([resize_frame(q['images'][c], hw) for c in cameras]) for q in batch])
|
| 82 |
+
images = torch.from_numpy(frames).to(device).permute(0, 1, 4, 2, 3).float().div_(255.)
|
| 83 |
+
state = torch.from_numpy(np.stack([q['state'] for q in batch]).astype(np.float32)).to(device)
|
| 84 |
+
generator = torch.Generator(device=device)
|
| 85 |
+
generator.manual_seed(int(seed))
|
| 86 |
+
extra = ()
|
| 87 |
+
if policy_name == 'flash':
|
| 88 |
+
from .flash import history_rows
|
| 89 |
+
span, hist, has = model.history_span, [], []
|
| 90 |
+
for q in batch:
|
| 91 |
+
past = np.asarray(q['past_action'], np.float32).reshape(-1, contract.action_dim)
|
| 92 |
+
rows = np.zeros((max(span, len(past)), contract.action_dim), np.float32)
|
| 93 |
+
valid = np.zeros(len(rows), bool)
|
| 94 |
+
if len(past):
|
| 95 |
+
rows[-len(past):], valid[-len(past):] = past, True
|
| 96 |
+
h, ok = history_rows(rows[-span:], valid[-span:], model.stride, model.n_history)
|
| 97 |
+
hist.append(h)
|
| 98 |
+
has.append(ok)
|
| 99 |
+
extra = (torch.from_numpy(np.stack(hist)).to(device), torch.tensor(has, device=device))
|
| 100 |
+
kwargs = {}
|
| 101 |
+
if getattr(model, 'lead_rows', 0): # the ODE policies start from the executed row before (BOS without one)
|
| 102 |
+
prev = [np.asarray(q.get('past_action', ()), np.float32).reshape(-1, contract.action_dim) for q in batch]
|
| 103 |
+
kwargs = dict(previous=torch.from_numpy(np.stack([p[-1] if len(p) else np.zeros(contract.action_dim,
|
| 104 |
+
np.float32)
|
| 105 |
+
for p in prev])).to(device),
|
| 106 |
+
has_previous=torch.tensor([len(p) > 0 for p in prev], device=device))
|
| 107 |
+
pred, _ = model.predict(images, state, *extra, generator=generator, **kwargs)
|
| 108 |
+
return pred.float().cpu().numpy()
|
| 109 |
+
|
| 110 |
+
info = dict(weights='ema', policy=policy_name, cache_checked_episodes=checked,
|
| 111 |
+
inloop_code=str(code_dir), cache=str(E.split_dir(task, split)))
|
| 112 |
+
loop = core.InLoop(policy_name, task, split, Path(run_dir) / 'logs' / 'inloop-mse.jsonl', predict,
|
| 113 |
+
cams=list(cameras), info=info)
|
| 114 |
+
loop.every = core.EVERY
|
| 115 |
+
loop.say(f'{policy_name} installed: task {task} split {split}, every {core.EVERY} steps, cache checked on '
|
| 116 |
+
f'episodes {checked}, code {code_dir}, G={os.environ.get("G", "<default>")}')
|
| 117 |
+
return loop
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/nets.py
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Networks of the FM-DiT and DP (DDPM-DiT) baselines: the AdaLN DiT action backbone and the camera + state encoder.
|
| 2 |
+
|
| 3 |
+
Ported from DextraVerse's imitation-learning core (`dextraverse/algorithms/il/models/nets/dit.py`, `layers.py`,
|
| 4 |
+
`positional_embedding.py`, `vision/backbones.py`, `vision/encoder.py`), unchanged in architecture and initialization.
|
| 5 |
+
Left out: the ROVE improvement embedding, the spatial-softmax / R3M / tactile options and the inpainting path (the
|
| 6 |
+
baselines always condition through the global observation feature). Added: the ResNet's normalization choice
|
| 7 |
+
(`get_resnet`): DextraVerse's GroupNorm for a backbone trained from scratch, or BatchNorm frozen at the pretrained
|
| 8 |
+
statistics (the DETR / ACT practice) for an ImageNet-initialized backbone that is fine-tuned with the policy.
|
| 9 |
+
"""
|
| 10 |
+
from __future__ import annotations
|
| 11 |
+
|
| 12 |
+
import math
|
| 13 |
+
|
| 14 |
+
import torch
|
| 15 |
+
import torch.nn as nn
|
| 16 |
+
import torch.nn.functional as F
|
| 17 |
+
import torchvision
|
| 18 |
+
|
| 19 |
+
IMAGENET_MEAN = (0.485, 0.456, 0.406)
|
| 20 |
+
IMAGENET_STD = (0.229, 0.224, 0.225)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class SinusoidalPosEmb(nn.Module):
|
| 24 |
+
def __init__(self, dim):
|
| 25 |
+
super().__init__()
|
| 26 |
+
self.dim = dim
|
| 27 |
+
|
| 28 |
+
def forward(self, x):
|
| 29 |
+
half_dim = self.dim // 2
|
| 30 |
+
emb = math.log(10000) / (half_dim - 1)
|
| 31 |
+
emb = torch.exp(torch.arange(half_dim, device=x.device) * -emb)
|
| 32 |
+
emb = x[:, None] * emb[None, :]
|
| 33 |
+
return torch.cat((emb.sin(), emb.cos()), dim=-1)
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
class RotaryPosEmb(nn.Module):
|
| 37 |
+
"""Rotary position embedding over each attention head's (S, head_dim) slice."""
|
| 38 |
+
|
| 39 |
+
def __init__(self, dim):
|
| 40 |
+
super().__init__()
|
| 41 |
+
self.dim = dim
|
| 42 |
+
self.register_buffer('inv_freq', 1.0 / (10000 ** (torch.arange(0, dim, 2).float() / dim)))
|
| 43 |
+
|
| 44 |
+
def forward(self, x): # x: (B, heads, S, head_dim)
|
| 45 |
+
t = torch.arange(x.shape[-2], device=x.device, dtype=self.inv_freq.dtype)
|
| 46 |
+
freqs = torch.outer(t, self.inv_freq.to(x.device))
|
| 47 |
+
emb = torch.cat([freqs, freqs], dim=-1)
|
| 48 |
+
cos, sin = emb.cos()[None, None], emb.sin()[None, None]
|
| 49 |
+
x1, x2 = x[..., : x.shape[-1] // 2], x[..., x.shape[-1] // 2:]
|
| 50 |
+
return x * cos + torch.cat([-x2, x1], dim=-1) * sin
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
class Mlp(nn.Module):
|
| 54 |
+
"""The ViT MLP (timm.layers.Mlp) as DextraVerse's nets/layers.py."""
|
| 55 |
+
|
| 56 |
+
def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0):
|
| 57 |
+
super().__init__()
|
| 58 |
+
out_features = out_features or in_features
|
| 59 |
+
hidden_features = hidden_features or in_features
|
| 60 |
+
self.fc1 = nn.Linear(in_features, hidden_features)
|
| 61 |
+
self.act = act_layer()
|
| 62 |
+
self.drop1 = nn.Dropout(drop)
|
| 63 |
+
self.norm = nn.Identity()
|
| 64 |
+
self.fc2 = nn.Linear(hidden_features, out_features)
|
| 65 |
+
self.drop2 = nn.Dropout(drop)
|
| 66 |
+
|
| 67 |
+
def forward(self, x):
|
| 68 |
+
return self.drop2(self.fc2(self.norm(self.drop1(self.act(self.fc1(x))))))
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
class Attention(nn.Module):
|
| 72 |
+
def __init__(self, dim, num_heads=8, qkv_bias=True, attn_drop=0.0, proj_drop=0.0, qk_norm=True):
|
| 73 |
+
super().__init__()
|
| 74 |
+
assert dim % num_heads == 0, 'dim should be divisible by num_heads'
|
| 75 |
+
self.num_heads = num_heads
|
| 76 |
+
self.head_dim = dim // num_heads
|
| 77 |
+
self.attn_drop = attn_drop
|
| 78 |
+
self.proj_drop = nn.Dropout(proj_drop)
|
| 79 |
+
self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
|
| 80 |
+
self.q_norm = nn.LayerNorm(self.head_dim) if qk_norm else nn.Identity()
|
| 81 |
+
self.k_norm = nn.LayerNorm(self.head_dim) if qk_norm else nn.Identity()
|
| 82 |
+
self.proj = nn.Linear(dim, dim)
|
| 83 |
+
self.rope = RotaryPosEmb(self.head_dim)
|
| 84 |
+
|
| 85 |
+
def forward(self, x):
|
| 86 |
+
B, S, C = x.shape
|
| 87 |
+
qkv = self.qkv(x).reshape(B, S, 3, self.num_heads, self.head_dim).permute(2, 0, 3, 1, 4)
|
| 88 |
+
q, k, v = qkv.unbind(0)
|
| 89 |
+
q, k = self.rope(self.q_norm(q)), self.rope(self.k_norm(k))
|
| 90 |
+
x = F.scaled_dot_product_attention(q, k, v, dropout_p=self.attn_drop if self.training else 0.0)
|
| 91 |
+
return self.proj_drop(self.proj(x.transpose(1, 2).reshape(B, S, C)))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
class AdaLNBlock(nn.Module):
|
| 95 |
+
"""Adaptive-LayerNorm transformer block as in DiT (Peebles et al. 2022)."""
|
| 96 |
+
|
| 97 |
+
def __init__(self, dim, num_heads, mlp_ratio=4.0, dropout=0.0):
|
| 98 |
+
super().__init__()
|
| 99 |
+
self.norm1 = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
| 100 |
+
self.attn = Attention(dim, num_heads=num_heads, attn_drop=dropout, proj_drop=dropout)
|
| 101 |
+
self.norm2 = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
| 102 |
+
self.mlp = Mlp(in_features=dim, hidden_features=int(dim * mlp_ratio),
|
| 103 |
+
act_layer=lambda: nn.GELU(approximate='tanh'), drop=0)
|
| 104 |
+
self.ada_ln = nn.Sequential(nn.SiLU(), nn.Linear(dim, 6 * dim))
|
| 105 |
+
self.dim = dim
|
| 106 |
+
nn.init.constant_(self.ada_ln[-1].weight, 0)
|
| 107 |
+
nn.init.constant_(self.ada_ln[-1].bias, 0)
|
| 108 |
+
|
| 109 |
+
def forward(self, x, t, c):
|
| 110 |
+
B = x.shape[0]
|
| 111 |
+
gamma1, gamma2, scale1, scale2, shift1, shift2 = self.ada_ln(F.silu(t + c)).view(B, 6, 1, self.dim).unbind(1)
|
| 112 |
+
x = x + self.attn(self.norm1(x).mul(scale1.add(1)).add_(shift1)).mul_(gamma1)
|
| 113 |
+
return x + self.mlp(self.norm2(x).mul(scale2.add(1)).add_(shift2)).mul_(gamma2)
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
class FlowTransformer(nn.Module):
|
| 117 |
+
"""DiT action backbone: AdaLN blocks over the H action tokens, conditioned on time_embed(t) + cond_embed(obs).
|
| 118 |
+
|
| 119 |
+
As DextraVerse, the generic Xavier initialization runs after the blocks' zero init of their AdaLN projection, so
|
| 120 |
+
it is not the full AdaLN-Zero recipe (kept: it is the reference's training behaviour)."""
|
| 121 |
+
|
| 122 |
+
def __init__(self, input_dim, condition_dim, hidden_dim, output_dim, num_layers, num_heads, mlp_ratio=4.0,
|
| 123 |
+
dropout=0.1, time_embed_dim=256):
|
| 124 |
+
super().__init__()
|
| 125 |
+
self.input_proj = nn.Linear(input_dim, hidden_dim)
|
| 126 |
+
self.time_embed = nn.Sequential(SinusoidalPosEmb(time_embed_dim), nn.Linear(time_embed_dim, time_embed_dim * 4),
|
| 127 |
+
nn.Mish(), nn.Linear(time_embed_dim * 4, hidden_dim))
|
| 128 |
+
self.cond_embed = nn.Linear(condition_dim, hidden_dim)
|
| 129 |
+
self.transformer_blocks = nn.ModuleList(
|
| 130 |
+
[AdaLNBlock(hidden_dim, num_heads, mlp_ratio=mlp_ratio, dropout=dropout) for _ in range(num_layers)])
|
| 131 |
+
self.norm = nn.LayerNorm(hidden_dim)
|
| 132 |
+
self.out_proj = nn.Linear(hidden_dim, output_dim)
|
| 133 |
+
|
| 134 |
+
def basic_init(module):
|
| 135 |
+
if isinstance(module, nn.Linear):
|
| 136 |
+
nn.init.xavier_uniform_(module.weight)
|
| 137 |
+
if module.bias is not None:
|
| 138 |
+
nn.init.constant_(module.bias, 0)
|
| 139 |
+
|
| 140 |
+
self.apply(basic_init)
|
| 141 |
+
nn.init.normal_(self.time_embed[1].weight, std=0.02)
|
| 142 |
+
nn.init.normal_(self.time_embed[3].weight, std=0.02)
|
| 143 |
+
|
| 144 |
+
def forward(self, x, t, global_cond):
|
| 145 |
+
if not torch.is_tensor(t):
|
| 146 |
+
t = torch.tensor(t, device=x.device)
|
| 147 |
+
if t.ndim == 0:
|
| 148 |
+
t = t.expand(x.shape[0])
|
| 149 |
+
x = self.input_proj(x)
|
| 150 |
+
t = self.time_embed(t)
|
| 151 |
+
c = self.cond_embed(global_cond)
|
| 152 |
+
for block in self.transformer_blocks:
|
| 153 |
+
x = block(x, t, c)
|
| 154 |
+
return self.out_proj(self.norm(x))
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
def replace_batchnorm_with_groupnorm(module: nn.Module) -> nn.Module:
|
| 158 |
+
"""DextraVerse's use_group_norm: every BatchNorm2d becomes GroupNorm(num_features // 16 groups)."""
|
| 159 |
+
for name, child in module.named_children():
|
| 160 |
+
if isinstance(child, nn.BatchNorm2d):
|
| 161 |
+
setattr(module, name, nn.GroupNorm(num_groups=child.num_features // 16, num_channels=child.num_features))
|
| 162 |
+
else:
|
| 163 |
+
replace_batchnorm_with_groupnorm(child)
|
| 164 |
+
return module
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
NORMS = ('group', 'frozen_bn')
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
def get_resnet(name='resnet18', weights=None, norm='group') -> nn.Module:
|
| 171 |
+
"""A torchvision ResNet with its classifier removed: (N, 3, H, W) -> (N, 512) globally pooled.
|
| 172 |
+
|
| 173 |
+
weights: torchvision weights name (e.g. 'IMAGENET1K_V1') to initialize from, or None (random initialization;
|
| 174 |
+
a checkpoint load supplies every weight). norm: 'group' replaces every BatchNorm with GroupNorm (DextraVerse's
|
| 175 |
+
use_group_norm, for training from scratch: pretrained BatchNorm statistics and affine are dropped); 'frozen_bn'
|
| 176 |
+
keeps BatchNorm frozen at its (pretrained) running statistics and affine, the convolutions fine-tune."""
|
| 177 |
+
if norm == 'frozen_bn':
|
| 178 |
+
from .act_nets import FrozenBatchNorm2d
|
| 179 |
+
resnet = getattr(torchvision.models, name)(weights=weights, norm_layer=FrozenBatchNorm2d)
|
| 180 |
+
elif norm == 'group':
|
| 181 |
+
resnet = replace_batchnorm_with_groupnorm(getattr(torchvision.models, name)(weights=weights))
|
| 182 |
+
else:
|
| 183 |
+
raise ValueError(f'norm must be one of {NORMS}, got {norm!r}')
|
| 184 |
+
resnet.fc = nn.Identity()
|
| 185 |
+
return resnet
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
class ImageStateEncoder(nn.Module):
|
| 189 |
+
"""DextraVerse MultiImageObsEncoder as configured for FM-DiT / DDPM-DiT: one ResNet shared by every camera
|
| 190 |
+
(share_rgb_model; `get_resnet` weights and norm), ImageNet normalization of the [0, 1] images, the pooled features
|
| 191 |
+
of each camera in the contract's camera order, then the normalized state. shared=False gives every camera its own
|
| 192 |
+
ResNet (share_rgb_model False, the ODE policy's encoder; `rgb` is then a ModuleList in camera order).
|
| 193 |
+
Output (B, n_cameras * 512 + state_dim)."""
|
| 194 |
+
|
| 195 |
+
def __init__(self, n_cameras, state_dim, backbone='resnet18', weights=None, norm='group', shared=True):
|
| 196 |
+
super().__init__()
|
| 197 |
+
self.n_cameras, self.state_dim, self.shared = int(n_cameras), int(state_dim), bool(shared)
|
| 198 |
+
self.rgb = (get_resnet(backbone, weights=weights, norm=norm) if self.shared else
|
| 199 |
+
nn.ModuleList([get_resnet(backbone, weights=weights, norm=norm) for _ in range(self.n_cameras)]))
|
| 200 |
+
self.register_buffer('mean', torch.tensor(IMAGENET_MEAN).view(1, 3, 1, 1), persistent=False)
|
| 201 |
+
self.register_buffer('std', torch.tensor(IMAGENET_STD).view(1, 3, 1, 1), persistent=False)
|
| 202 |
+
self.feature_dim = self.n_cameras * (512 if backbone in ('resnet18', 'resnet34') else 2048) + self.state_dim
|
| 203 |
+
|
| 204 |
+
def forward(self, images, state):
|
| 205 |
+
"""images (B, n_cameras, 3, H, W) in [0, 1]; state (B, state_dim) normalized."""
|
| 206 |
+
B = images.shape[0]
|
| 207 |
+
if self.shared:
|
| 208 |
+
x = (images.flatten(0, 1) - self.mean) / self.std
|
| 209 |
+
features = self.rgb(x).reshape(B, -1) # camera features side by side, in camera order
|
| 210 |
+
else:
|
| 211 |
+
features = torch.cat([net((images[:, i] - self.mean) / self.std) for i, net in enumerate(self.rgb)], dim=-1)
|
| 212 |
+
return torch.cat([features, state], dim=-1)
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/ode_nets.py
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Vector fields of the ODE policy baselines (ODE-MLP, ODE-DiT).
|
| 2 |
+
|
| 3 |
+
Ported from ODE Policy (Jindou Jia et al., https://github.com/NTUMARS/ODE-POLICY, branch main @cea26d94, Apache-2.0):
|
| 4 |
+
`ode_policy/policies/ode/ode_image_policy.py` (`_FiLMLayer`, `VectorField`, `DiTVectorField`) and the DiT parts it
|
| 5 |
+
uses, `ode_policy/utils/models/flow_net.py` (`Attention`, `AdaLNBlock`), `ode_policy/utils/models/layers.py` (`Mlp`)
|
| 6 |
+
and `ode_policy/policies/dp/models/diffusion/positional_embedding.py` (`RotaryPosEmb`, torchtune's interleaved RoPE
|
| 7 |
+
over the full width, which differs from the DextraVerse RoPE of nets.py). Architectures and initializations are
|
| 8 |
+
unchanged. Left out: the gripper-only dropout pass (`drop_first`; the benchmark's actions have no binary gripper).
|
| 9 |
+
|
| 10 |
+
Both fields are autonomous (no time input): f(a, s | c) depends only on where the action state `a` is, the
|
| 11 |
+
proprioception `s` (when the field reads it) and the per-chunk condition `c`; the output layer starts at zero, so an
|
| 12 |
+
untrained policy holds its start action.
|
| 13 |
+
"""
|
| 14 |
+
from __future__ import annotations
|
| 15 |
+
|
| 16 |
+
import torch
|
| 17 |
+
import torch.nn as nn
|
| 18 |
+
import torch.nn.functional as F
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class FiLMLayer(nn.Module):
|
| 22 |
+
def __init__(self, dim, cond_dim):
|
| 23 |
+
super().__init__()
|
| 24 |
+
self.lin = nn.Linear(dim, dim)
|
| 25 |
+
self.film = nn.Linear(cond_dim, 2 * dim)
|
| 26 |
+
|
| 27 |
+
def forward(self, h, c=None, gb=None):
|
| 28 |
+
g, b = gb if gb is not None else self.film(c).chunk(2, dim=-1)
|
| 29 |
+
return h + F.silu(self.lin(h) * (1 + g) + b)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
class VectorField(nn.Module):
|
| 33 |
+
"""ODE-MLP: f(a, s | c), a FiLM-modulated residual MLP. Training-only dropout on the hidden units keeps one mask
|
| 34 |
+
per sample for every field call until reset_dropout(), so a whole integrated chunk sees one thinned field."""
|
| 35 |
+
|
| 36 |
+
def __init__(self, cond_dim, state_dim, hidden_dim, num_layers, out_dim, pose_dim, dropout=0.0):
|
| 37 |
+
super().__init__()
|
| 38 |
+
self.dropout, self._masks = float(dropout), None
|
| 39 |
+
self.inp = nn.Linear(pose_dim + state_dim, hidden_dim)
|
| 40 |
+
self.layers = nn.ModuleList([FiLMLayer(hidden_dim, cond_dim) for _ in range(num_layers)])
|
| 41 |
+
self.out = nn.Linear(hidden_dim, out_dim)
|
| 42 |
+
self.feat_dim = hidden_dim
|
| 43 |
+
nn.init.zeros_(self.out.weight)
|
| 44 |
+
nn.init.zeros_(self.out.bias)
|
| 45 |
+
|
| 46 |
+
def precompute(self, c):
|
| 47 |
+
"""FiLM scale/shift depend on c only; computed once per integration."""
|
| 48 |
+
return [layer.film(c).chunk(2, dim=-1) for layer in self.layers]
|
| 49 |
+
|
| 50 |
+
def reset_dropout(self):
|
| 51 |
+
self._masks = None
|
| 52 |
+
|
| 53 |
+
def forward(self, a, s, c, film=None):
|
| 54 |
+
drop = self.training and self.dropout > 0
|
| 55 |
+
h = self.inp(torch.cat([a, s], dim=-1))
|
| 56 |
+
if drop and (self._masks is None or self._masks[0].shape != h.shape):
|
| 57 |
+
keep = 1.0 - self.dropout
|
| 58 |
+
self._masks = [torch.bernoulli(torch.full_like(h, keep)) / keep for _ in self.layers]
|
| 59 |
+
for i, layer in enumerate(self.layers):
|
| 60 |
+
h = layer(h, c, None if film is None else film[i])
|
| 61 |
+
if drop:
|
| 62 |
+
h = h * self._masks[i]
|
| 63 |
+
return self.out(h)
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
class RotaryPosEmb(nn.Module):
|
| 67 |
+
"""Rotary positional embedding (torchtune), built over the full width `dim` and applied to the heads' slices."""
|
| 68 |
+
|
| 69 |
+
def __init__(self, dim: int, max_seq_len: int = 256, base: int = 10_000):
|
| 70 |
+
super().__init__()
|
| 71 |
+
self.dim, self.base, self.max_seq_len = dim, base, max_seq_len
|
| 72 |
+
theta = 1.0 / (base ** (torch.arange(0, dim, 2)[: (dim // 2)].float() / dim))
|
| 73 |
+
self.register_buffer('theta', theta, persistent=False)
|
| 74 |
+
seq_idx = torch.arange(max_seq_len, dtype=theta.dtype)
|
| 75 |
+
idx_theta = torch.einsum('i, j -> ij', seq_idx, theta).float()
|
| 76 |
+
self.register_buffer('cache', torch.stack([torch.cos(idx_theta), torch.sin(idx_theta)], dim=-1),
|
| 77 |
+
persistent=False)
|
| 78 |
+
|
| 79 |
+
def forward(self, x):
|
| 80 |
+
"""x (B, num_heads, S, head_dim) -> the same shape."""
|
| 81 |
+
x = x.permute(0, 2, 1, 3) # (B, S, num_heads, head_dim)
|
| 82 |
+
B, S, num_heads, head_dim = x.size()
|
| 83 |
+
rope_cache = self.cache[:S]
|
| 84 |
+
xshaped = x.float().reshape(*x.shape[:-1], head_dim // 2, 2)
|
| 85 |
+
rope_cache = rope_cache.view(1, S, num_heads, head_dim // 2, 2)
|
| 86 |
+
x_out = torch.stack([xshaped[..., 0] * rope_cache[..., 0] - xshaped[..., 1] * rope_cache[..., 1],
|
| 87 |
+
xshaped[..., 1] * rope_cache[..., 0] + xshaped[..., 0] * rope_cache[..., 1]], -1)
|
| 88 |
+
return x_out.flatten(3).permute(0, 2, 1, 3).type_as(x)
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
class Attention(nn.Module):
|
| 92 |
+
def __init__(self, dim, num_heads=8, qkv_bias=True, attn_drop=0., proj_drop=0., max_seq_len=64, qk_norm=True):
|
| 93 |
+
super().__init__()
|
| 94 |
+
assert dim % num_heads == 0, 'dim should be divisible by num_heads'
|
| 95 |
+
self.num_heads = num_heads
|
| 96 |
+
self.head_dim = dim // num_heads
|
| 97 |
+
self.attn_drop = attn_drop
|
| 98 |
+
self.proj_drop = nn.Dropout(proj_drop)
|
| 99 |
+
self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
|
| 100 |
+
self.q_norm = nn.LayerNorm(self.head_dim) if qk_norm else nn.Identity()
|
| 101 |
+
self.k_norm = nn.LayerNorm(self.head_dim) if qk_norm else nn.Identity()
|
| 102 |
+
self.proj = nn.Linear(dim, dim)
|
| 103 |
+
self.rope = RotaryPosEmb(dim, max_seq_len=max_seq_len)
|
| 104 |
+
|
| 105 |
+
def forward(self, x, mask=None):
|
| 106 |
+
B, S, C = x.shape
|
| 107 |
+
qkv = self.qkv(x).reshape(B, S, 3, self.num_heads, self.head_dim).permute(2, 0, 3, 1, 4)
|
| 108 |
+
q, k, v = qkv.unbind(0)
|
| 109 |
+
q, k = self.rope(self.q_norm(q)), self.rope(self.k_norm(k))
|
| 110 |
+
if self.training:
|
| 111 |
+
x = F.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=self.attn_drop)
|
| 112 |
+
else:
|
| 113 |
+
x = F.scaled_dot_product_attention(q, k, v)
|
| 114 |
+
return self.proj_drop(self.proj(x.transpose(1, 2).reshape(B, S, C)))
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
class Mlp(nn.Module):
|
| 118 |
+
"""The ViT MLP (timm.layers.Mlp) as ODE Policy's utils/models/layers.py, linear layers only."""
|
| 119 |
+
|
| 120 |
+
def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.):
|
| 121 |
+
super().__init__()
|
| 122 |
+
out_features = out_features or in_features
|
| 123 |
+
hidden_features = hidden_features or in_features
|
| 124 |
+
self.fc1 = nn.Linear(in_features, hidden_features)
|
| 125 |
+
self.act = act_layer()
|
| 126 |
+
self.drop1 = nn.Dropout(drop)
|
| 127 |
+
self.norm = nn.Identity()
|
| 128 |
+
self.fc2 = nn.Linear(hidden_features, out_features)
|
| 129 |
+
self.drop2 = nn.Dropout(drop)
|
| 130 |
+
|
| 131 |
+
def forward(self, x):
|
| 132 |
+
return self.drop2(self.fc2(self.norm(self.drop1(self.act(self.fc1(x))))))
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
class AdaLNBlock(nn.Module):
|
| 136 |
+
"""Adaptive-LayerNorm transformer block as in DiT (Peebles et al. 2022); ada_ln starts at zero (adaLN-zero)."""
|
| 137 |
+
|
| 138 |
+
def __init__(self, dim, num_heads, mlp_ratio=4., dropout=0.):
|
| 139 |
+
super().__init__()
|
| 140 |
+
self.norm1 = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
| 141 |
+
self.attn = Attention(dim, num_heads=num_heads, attn_drop=dropout, proj_drop=dropout)
|
| 142 |
+
self.norm2 = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
| 143 |
+
self.mlp = Mlp(in_features=dim, hidden_features=int(dim * mlp_ratio),
|
| 144 |
+
act_layer=lambda: nn.GELU(approximate='tanh'), drop=0)
|
| 145 |
+
self.ada_ln = nn.Sequential(nn.SiLU(), nn.Linear(dim, 6 * dim))
|
| 146 |
+
self.dim = dim
|
| 147 |
+
nn.init.constant_(self.ada_ln[-1].weight, 0)
|
| 148 |
+
nn.init.constant_(self.ada_ln[-1].bias, 0)
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
class DiTVectorField(nn.Module):
|
| 152 |
+
"""ODE-DiT: the vector field built from DiT blocks. [a, s] is projected to n_tokens tokens; every block's
|
| 153 |
+
LayerNorm scales/shifts/gates are regressed from the condition c (no time input: the field is autonomous); the
|
| 154 |
+
tokens are pooled for the output. Same interface and zero-initialized output as VectorField."""
|
| 155 |
+
|
| 156 |
+
def __init__(self, cond_dim, state_dim, hidden_dim, num_layers, out_dim, pose_dim, num_heads=8, n_tokens=4,
|
| 157 |
+
mlp_ratio=4.0):
|
| 158 |
+
super().__init__()
|
| 159 |
+
self.n_tokens, self.hidden_dim, self.feat_dim = n_tokens, hidden_dim, hidden_dim
|
| 160 |
+
self.inp = nn.Linear(pose_dim + state_dim, n_tokens * hidden_dim)
|
| 161 |
+
self.pos = nn.Parameter(torch.zeros(1, n_tokens, hidden_dim))
|
| 162 |
+
self.cond = nn.Linear(cond_dim, hidden_dim)
|
| 163 |
+
self.blocks = nn.ModuleList([AdaLNBlock(hidden_dim, num_heads, mlp_ratio) for _ in range(num_layers)])
|
| 164 |
+
self.norm = nn.LayerNorm(hidden_dim)
|
| 165 |
+
self.out = nn.Linear(hidden_dim, out_dim)
|
| 166 |
+
nn.init.zeros_(self.out.weight)
|
| 167 |
+
nn.init.zeros_(self.out.bias)
|
| 168 |
+
|
| 169 |
+
def precompute(self, c):
|
| 170 |
+
"""The adaLN scales/shifts/gates depend on c only: computed once per integration."""
|
| 171 |
+
cc = F.silu(self.cond(c))
|
| 172 |
+
return [blk.ada_ln(cc).view(c.shape[0], 6, 1, self.hidden_dim).unbind(1) for blk in self.blocks]
|
| 173 |
+
|
| 174 |
+
def forward(self, a, s, c, film=None):
|
| 175 |
+
B = a.shape[0]
|
| 176 |
+
x = self.inp(torch.cat([a, s], dim=-1)).view(B, self.n_tokens, self.hidden_dim) + self.pos
|
| 177 |
+
mods = self.precompute(c) if film is None else film
|
| 178 |
+
for blk, (g1, g2, sc1, sc2, sh1, sh2) in zip(self.blocks, mods):
|
| 179 |
+
x = x + blk.attn(blk.norm1(x) * (1 + sc1) + sh1) * g1
|
| 180 |
+
x = x + blk.mlp(blk.norm2(x) * (1 + sc2) + sh2) * g2
|
| 181 |
+
return self.out(self.norm(x).mean(dim=1))
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/policies.py
ADDED
|
@@ -0,0 +1,454 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""The baseline policies behind one contract; the first three ported from DextraVerse's imitation-learning core:
|
| 2 |
+
|
| 3 |
+
- `fm_dit`, `FMDiTPolicy` (reference: dextraverse/algorithms/il/models/fm_dit.py + fm_base.py): flow matching, MSE on
|
| 4 |
+
the velocity `a - noise`; sampled with 10 midpoint steps from noise (20 DiT calls);
|
| 5 |
+
- `dp`, `DPPolicy` (ddpm_dit.py + ddpm_base.py: Diffusion Policy with a DiT backbone): DDPM epsilon MSE over 100
|
| 6 |
+
steps; sampled with the 100 DDPM steps;
|
| 7 |
+
- `act`, `ACTPolicy` (act.py + nets/act/): L1 + `kl_weight` x KL of the CVAE; decoded from the zero latent in one pass;
|
| 8 |
+
- `flash`, `flash.FlashPolicy` (NTUMARS/FLASH-Policy @ f47e490): polynomial-coefficient flow from the fitted history
|
| 9 |
+
of the executed actions to the future, one Euler step; its contract adds the history (flash.py's docstring).
|
| 10 |
+
|
| 11 |
+
Two follow ODE Policy's G1 port (Jia et al., github.com/NTUMARS/ODE-POLICY branch real-g1 @fd8bec47, maintained in
|
| 12 |
+
HumanWAM as packages/ode_g1: model.py `SonicLatentODE`, data.py), with its GR00T backbone replaced by ODE Policy's own
|
| 13 |
+
image encoder (ode_policy main @cea26d94, ode.yaml), each in its authors' configuration (not aligned with the others):
|
| 14 |
+
|
| 15 |
+
- `ode_mlp`, `ODEPolicy`: the body part of the action (G1: the SONIC motion token) is an ODE state, db/dt =
|
| 16 |
+
f(b, s | c) with a FiLM residual MLP field, integrated with Euler one row per step from the body row executed at t-1;
|
| 17 |
+
the hands are decoded from c; masked MSE of the integrated path and the hands;
|
| 18 |
+
- `ode_dit`, `ODEDiTPolicy`: the same with ODE Policy's DiT (adaLN) field (ode_dit.yaml).
|
| 19 |
+
|
| 20 |
+
Contract (every policy): `compute_loss(images, state, action) -> (loss, metrics)` and
|
| 21 |
+
`predict(images, state, generator) -> (action, normalized action)`; images (B, n_cameras, 3, H, W) float in [0, 1],
|
| 22 |
+
state (B, state_dim) and action (B, lead_rows + horizon, action_dim) in physical units. Each policy owns its
|
| 23 |
+
`Normalizer` (DextraVerse's LinearNormalizer 'limits' mode: state and action to [-1, 1] per dimension, constant
|
| 24 |
+
dimensions shifted to 0), saved in its state dict. One observation frame (n_obs_steps 1: the current images and
|
| 25 |
+
state); the chunk's row 0 is the action of the observation's own frame (the LeRobot rows t..t+horizon-1). A policy
|
| 26 |
+
with `lead_rows` 1 (the ODE policies) also reads the row before, t-1, and the rows' validity (ChunkDataset `lead`),
|
| 27 |
+
and its `predict` takes `previous`, the action row executed at t-1. The ODE policies normalize with their own bounds
|
| 28 |
+
(q01 / q99, the DFX6 hands fixed at [0, 1], clipped to [-5, 5]). The configuration that builds a policy is a plain
|
| 29 |
+
dict (`PolicyConfig` fields), stored in the checkpoint.
|
| 30 |
+
|
| 31 |
+
The ResNet18 of FM-DiT, DP and ACT starts from torchvision's ImageNet-1k weights (`backbone_weights` 'IMAGENET1K_V1',
|
| 32 |
+
the default since 2026-11-16) and is fine-tuned with the policy, its BatchNorm frozen at the pretrained statistics
|
| 33 |
+
(`backbone_norm` 'frozen_bn', as ACT always does); `backbone_weights` None trains from scratch with DextraVerse's
|
| 34 |
+
GroupNorm encoder (FM-DiT, DP) or ACT's frozen-BatchNorm one. The ODE policies default to ODE Policy's encoder: one
|
| 35 |
+
ResNet18 per camera, from scratch, GroupNorm. A checkpoint load builds the structure without fetching any weights.
|
| 36 |
+
"""
|
| 37 |
+
from __future__ import annotations
|
| 38 |
+
|
| 39 |
+
from dataclasses import asdict, dataclass, field, replace
|
| 40 |
+
|
| 41 |
+
import torch
|
| 42 |
+
import torch.nn as nn
|
| 43 |
+
import torch.nn.functional as F
|
| 44 |
+
|
| 45 |
+
from .act_nets import DETRVAE, Transformer, build_backbone, build_style_encoder, kl_divergence
|
| 46 |
+
from .nets import IMAGENET_MEAN, IMAGENET_STD, FlowTransformer, ImageStateEncoder
|
| 47 |
+
from .ode_nets import DiTVectorField, VectorField
|
| 48 |
+
|
| 49 |
+
ODE_POLICIES = ('ode_mlp', 'ode_dit')
|
| 50 |
+
# Defaults that differ by policy. horizon and backbone_weights resolve in PolicyConfig; backbone_lr_scale (and amp)
|
| 51 |
+
# are the training script's. The ODE policies: 16-row chunks (the G1 port's H16; its deployment re-plans about 4 rows
|
| 52 |
+
# before a chunk ends, as the benchmark clients' query every 12 rows), ODE Policy's encoder from scratch at the full
|
| 53 |
+
# learning rate (ode.yaml, default_train.yaml). Mixed precision as the G1 port: the encoder under bf16 autocast, the
|
| 54 |
+
# ODE head in FP32.
|
| 55 |
+
# The training recipe of ODE Policy's default_train.yaml (the same NTUMARS trainer as FLASH's): seed 42, lr 1e-4 at
|
| 56 |
+
# the benchmark's batch 512 without batch scaling (as every model of the protocol, HumanWAM REPRODUCIBILITY.md
|
| 57 |
+
# section 4), 500-step warm-up then diffusers' cosine, Diffusion Policy's EMAModel as upstream counts it.
|
| 58 |
+
POLICY_DEFAULTS = {name: dict(horizon=16, backbone_weights=None, backbone_lr_scale=1.0, seed=42,
|
| 59 |
+
schedule='diffusers_cosine', ema_schedule='diffusion_policy_emamodel')
|
| 60 |
+
for name in ODE_POLICIES}
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
@dataclass
|
| 64 |
+
class PolicyConfig:
|
| 65 |
+
"""Everything that builds a policy (stored in the checkpoint's config.json). Model defaults are DextraVerse's
|
| 66 |
+
configs/algorithm/il/model/{fm_dit,ddpm_dit,act}.yaml and, for the ODE policies (`ode_*` fields), ODE Policy's G1
|
| 67 |
+
port (HumanWAM packages/ode_g1 configs/g1.yaml `head`) and ode_dit.yaml for the DiT field."""
|
| 68 |
+
policy: str
|
| 69 |
+
n_cameras: int
|
| 70 |
+
state_dim: int
|
| 71 |
+
action_dim: int
|
| 72 |
+
horizon: int | None = None # None: the policy's default (POLICY_DEFAULTS, else 16)
|
| 73 |
+
backbone: str = 'resnet18'
|
| 74 |
+
# torchvision weights to initialize from; None = from scratch; 'default': IMAGENET1K_V1, the ODE policies None
|
| 75 |
+
backbone_weights: str | None = 'default'
|
| 76 |
+
backbone_norm: str | None = None # 'frozen_bn' or 'group'; None: frozen_bn when pretrained or ACT, else group
|
| 77 |
+
# FM-DiT / DP (DiT backbone)
|
| 78 |
+
hidden_dim: int = 384
|
| 79 |
+
num_layers: int = 4
|
| 80 |
+
num_heads: int = 8
|
| 81 |
+
mlp_ratio: float = 4.0
|
| 82 |
+
dropout: float = 0.1
|
| 83 |
+
time_embed_dim: int = 128
|
| 84 |
+
num_inference_steps: int | None = None # None: FM-DiT 10 midpoint steps, DP every training timestep (100)
|
| 85 |
+
# DP noise schedule (diffusers DDPMScheduler)
|
| 86 |
+
num_train_timesteps: int = 100
|
| 87 |
+
beta_schedule: str = 'squaredcos_cap_v2'
|
| 88 |
+
prediction_type: str = 'epsilon'
|
| 89 |
+
clip_sample: bool = True
|
| 90 |
+
# ACT
|
| 91 |
+
act_hidden_dim: int = 512
|
| 92 |
+
dim_feedforward: int = 3200
|
| 93 |
+
enc_layers: int = 4
|
| 94 |
+
dec_layers: int = 7
|
| 95 |
+
nheads: int = 8
|
| 96 |
+
latent_dim: int = 32
|
| 97 |
+
kl_weight: float = 10.0
|
| 98 |
+
# ODE policies (G1 port, configs/g1.yaml head: width 512, 4 FiLM layers, cond 512, field_scale 1). ode_body_dim:
|
| 99 |
+
# the leading action columns integrated as the ODE state, the rest decoded from the condition (G1: the token 64 and
|
| 100 |
+
# the DFX6 12; train.py sets it to the contract's first action group, H2: body_target 31). ODE-DiT: ODE Policy's
|
| 101 |
+
# DiT field, 512 wide, 4 blocks, 8 heads, 4 tokens (ode_dit.yaml).
|
| 102 |
+
ode_body_dim: int | None = None
|
| 103 |
+
ode_width: int = 512
|
| 104 |
+
ode_layers: int = 4
|
| 105 |
+
ode_cond_dim: int = 512
|
| 106 |
+
ode_field_scale: float = 1.0
|
| 107 |
+
ode_dit_hidden: int = 512
|
| 108 |
+
ode_dit_layers: int = 4
|
| 109 |
+
ode_dit_heads: int = 8
|
| 110 |
+
ode_dit_tokens: int = 4
|
| 111 |
+
extra: dict = field(default_factory=dict)
|
| 112 |
+
|
| 113 |
+
def __post_init__(self):
|
| 114 |
+
defaults = POLICY_DEFAULTS.get(self.policy, {})
|
| 115 |
+
if self.horizon is None:
|
| 116 |
+
self.horizon = int(defaults.get('horizon', 16))
|
| 117 |
+
if self.backbone_weights == 'default':
|
| 118 |
+
self.backbone_weights = defaults.get('backbone_weights', 'IMAGENET1K_V1')
|
| 119 |
+
if self.backbone_norm is None:
|
| 120 |
+
self.backbone_norm = 'frozen_bn' if self.backbone_weights or self.policy == 'act' else 'group'
|
| 121 |
+
if self.policy == 'act' and self.backbone_norm != 'frozen_bn':
|
| 122 |
+
raise ValueError("ACT's backbone keeps frozen BatchNorm (backbone_norm 'frozen_bn')")
|
| 123 |
+
|
| 124 |
+
@classmethod
|
| 125 |
+
def from_dict(cls, data: dict) -> PolicyConfig:
|
| 126 |
+
known = {k: v for k, v in data.items() if k in cls.__dataclass_fields__}
|
| 127 |
+
return cls(**known)
|
| 128 |
+
|
| 129 |
+
def to_dict(self) -> dict:
|
| 130 |
+
return asdict(self)
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
class Normalizer(nn.Module):
|
| 134 |
+
"""Per-dimension affine map to [-1, 1] from the training data's min/max (DextraVerse LinearNormalizer, mode
|
| 135 |
+
'limits', fit_offset, range_eps 1e-4): x_n = x * scale + offset; a dimension whose range is below range_eps gets
|
| 136 |
+
scale 1 and maps its value to 0."""
|
| 137 |
+
|
| 138 |
+
def __init__(self, dim: int):
|
| 139 |
+
super().__init__()
|
| 140 |
+
self.register_buffer('scale', torch.ones(dim))
|
| 141 |
+
self.register_buffer('offset', torch.zeros(dim))
|
| 142 |
+
|
| 143 |
+
@torch.no_grad()
|
| 144 |
+
def fit(self, minimum, maximum, range_eps=1e-4):
|
| 145 |
+
lo = torch.as_tensor(minimum, dtype=torch.float32)
|
| 146 |
+
hi = torch.as_tensor(maximum, dtype=torch.float32)
|
| 147 |
+
span = hi - lo
|
| 148 |
+
ignore = span < range_eps
|
| 149 |
+
span[ignore] = 2.0
|
| 150 |
+
scale = 2.0 / span
|
| 151 |
+
offset = -1.0 - scale * lo
|
| 152 |
+
offset[ignore] = -lo[ignore]
|
| 153 |
+
self.scale.copy_(scale)
|
| 154 |
+
self.offset.copy_(offset)
|
| 155 |
+
|
| 156 |
+
def normalize(self, x):
|
| 157 |
+
return x * self.scale + self.offset
|
| 158 |
+
|
| 159 |
+
def unnormalize(self, x):
|
| 160 |
+
return (x - self.offset) / self.scale
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
class BasePolicy(nn.Module):
|
| 164 |
+
name = ''
|
| 165 |
+
backbone_prefix = '' # state-dict prefix of the image backbone (its own learning rate in training)
|
| 166 |
+
lead_rows = 0 # action rows before the observation's frame that a training item carries (ODE: 1, the start)
|
| 167 |
+
|
| 168 |
+
def __init__(self, cfg: PolicyConfig, init_weights=None):
|
| 169 |
+
super().__init__()
|
| 170 |
+
self.cfg = cfg
|
| 171 |
+
self.state_norm = Normalizer(cfg.state_dim)
|
| 172 |
+
self.action_norm = Normalizer(cfg.action_dim)
|
| 173 |
+
|
| 174 |
+
def fit_normalizers(self, stats: dict):
|
| 175 |
+
self.state_norm.fit(stats['state']['min'], stats['state']['max'])
|
| 176 |
+
self.action_norm.fit(stats['action']['min'], stats['action']['max'])
|
| 177 |
+
|
| 178 |
+
@property
|
| 179 |
+
def sampling_steps(self) -> int:
|
| 180 |
+
return 1
|
| 181 |
+
|
| 182 |
+
def compute_loss(self, images, state, action):
|
| 183 |
+
raise NotImplementedError
|
| 184 |
+
|
| 185 |
+
def predict(self, images, state, generator=None):
|
| 186 |
+
raise NotImplementedError
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
class DiTPolicy(BasePolicy):
|
| 190 |
+
"""Shared by FM-DiT and DP: the shared-ResNet image + state encoder and the AdaLN DiT over the action chunk
|
| 191 |
+
(global observation conditioning, DextraVerse obs_as_global_cond)."""
|
| 192 |
+
backbone_prefix = 'obs_encoder.rgb.'
|
| 193 |
+
|
| 194 |
+
def __init__(self, cfg: PolicyConfig, init_weights=None):
|
| 195 |
+
super().__init__(cfg)
|
| 196 |
+
self.obs_encoder = ImageStateEncoder(cfg.n_cameras, cfg.state_dim, backbone=cfg.backbone,
|
| 197 |
+
weights=init_weights, norm=cfg.backbone_norm)
|
| 198 |
+
self.model = FlowTransformer(input_dim=cfg.action_dim, condition_dim=self.obs_encoder.feature_dim,
|
| 199 |
+
hidden_dim=cfg.hidden_dim, output_dim=cfg.action_dim, num_layers=cfg.num_layers,
|
| 200 |
+
num_heads=cfg.num_heads, mlp_ratio=cfg.mlp_ratio, dropout=cfg.dropout,
|
| 201 |
+
time_embed_dim=cfg.time_embed_dim)
|
| 202 |
+
|
| 203 |
+
def condition(self, images, state):
|
| 204 |
+
return self.obs_encoder(images, self.state_norm.normalize(state))
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
class FMDiTPolicy(DiTPolicy):
|
| 208 |
+
"""Flow-matching DiT (DextraVerse FlowMatchingDiTImagePolicy): x_t = (1 - t) noise + t a, t ~ U(0, 1), the DiT
|
| 209 |
+
regresses the velocity a - noise; sampling integrates t = 0 -> 1 with the midpoint rule."""
|
| 210 |
+
name = 'fm_dit'
|
| 211 |
+
|
| 212 |
+
@property
|
| 213 |
+
def sampling_steps(self) -> int:
|
| 214 |
+
return int(self.cfg.num_inference_steps or 10)
|
| 215 |
+
|
| 216 |
+
def compute_loss(self, images, state, action):
|
| 217 |
+
cond = self.condition(images, state)
|
| 218 |
+
target = self.action_norm.normalize(action)
|
| 219 |
+
noise = torch.randn_like(target)
|
| 220 |
+
t = torch.rand(target.shape[0], device=target.device)
|
| 221 |
+
te = t.view(-1, 1, 1)
|
| 222 |
+
x_t = (1 - te) * noise + te * target
|
| 223 |
+
loss = F.mse_loss(self.model(x_t, t, cond), target - noise)
|
| 224 |
+
return loss, dict(fm=float(loss.detach()))
|
| 225 |
+
|
| 226 |
+
@torch.no_grad()
|
| 227 |
+
def predict(self, images, state, generator=None):
|
| 228 |
+
cond = self.condition(images, state)
|
| 229 |
+
B, steps = images.shape[0], self.sampling_steps
|
| 230 |
+
x = torch.randn((B, self.cfg.horizon, self.cfg.action_dim), device=cond.device, dtype=cond.dtype,
|
| 231 |
+
generator=generator)
|
| 232 |
+
times = torch.linspace(0, 1.0, steps + 1, device=cond.device)
|
| 233 |
+
for i in range(steps):
|
| 234 |
+
t0 = times[i].view(1).expand(B)
|
| 235 |
+
t1 = times[i + 1].view(1).expand(B)
|
| 236 |
+
dt = (t1 - t0).view(-1, 1, 1)
|
| 237 |
+
x_mid = x + self.model(x, t0, cond) * dt / 2
|
| 238 |
+
x = x + dt * self.model(x_mid, t0 + (t1 - t0) / 2, cond)
|
| 239 |
+
return self.action_norm.unnormalize(x), x
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
class DPPolicy(DiTPolicy):
|
| 243 |
+
"""Diffusion Policy with the DiT backbone (DextraVerse DiffusionDiTImagePolicy, ddpm_dit.yaml): DDPM with 100
|
| 244 |
+
training steps, squaredcos_cap_v2 betas, fixed_small variance, clipped samples, epsilon prediction; sampled with
|
| 245 |
+
every training step (100 DiT calls)."""
|
| 246 |
+
name = 'dp'
|
| 247 |
+
|
| 248 |
+
def __init__(self, cfg: PolicyConfig, init_weights=None):
|
| 249 |
+
super().__init__(cfg, init_weights)
|
| 250 |
+
from diffusers.schedulers.scheduling_ddpm import DDPMScheduler
|
| 251 |
+
self.noise_scheduler = DDPMScheduler(num_train_timesteps=cfg.num_train_timesteps, beta_start=0.0001,
|
| 252 |
+
beta_end=0.02, beta_schedule=cfg.beta_schedule,
|
| 253 |
+
variance_type='fixed_small', clip_sample=cfg.clip_sample,
|
| 254 |
+
prediction_type=cfg.prediction_type)
|
| 255 |
+
|
| 256 |
+
@property
|
| 257 |
+
def sampling_steps(self) -> int:
|
| 258 |
+
return int(self.cfg.num_inference_steps or self.cfg.num_train_timesteps)
|
| 259 |
+
|
| 260 |
+
def compute_loss(self, images, state, action):
|
| 261 |
+
cond = self.condition(images, state)
|
| 262 |
+
target = self.action_norm.normalize(action)
|
| 263 |
+
noise = torch.randn_like(target)
|
| 264 |
+
t = torch.randint(0, self.noise_scheduler.config.num_train_timesteps, (target.shape[0],),
|
| 265 |
+
device=target.device).long()
|
| 266 |
+
noisy = self.noise_scheduler.add_noise(target, noise, t)
|
| 267 |
+
pred = self.model(noisy, t, cond)
|
| 268 |
+
goal = noise if self.cfg.prediction_type == 'epsilon' else target
|
| 269 |
+
loss = F.mse_loss(pred, goal)
|
| 270 |
+
return loss, dict(ddpm=float(loss.detach()))
|
| 271 |
+
|
| 272 |
+
@torch.no_grad()
|
| 273 |
+
def predict(self, images, state, generator=None):
|
| 274 |
+
cond = self.condition(images, state)
|
| 275 |
+
scheduler = self.noise_scheduler
|
| 276 |
+
x = torch.randn((images.shape[0], self.cfg.horizon, self.cfg.action_dim), device=cond.device,
|
| 277 |
+
dtype=cond.dtype, generator=generator)
|
| 278 |
+
scheduler.set_timesteps(self.sampling_steps, device=cond.device)
|
| 279 |
+
for t in scheduler.timesteps:
|
| 280 |
+
x = scheduler.step(self.model(x, t.to(cond.device), cond), t, x, generator=generator).prev_sample
|
| 281 |
+
return self.action_norm.unnormalize(x), x
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
class ACTPolicy(BasePolicy):
|
| 285 |
+
"""ACT (DextraVerse ACTImagePolicy, act.yaml): ImageNet-normalized cameras through one ResNet with frozen
|
| 286 |
+
BatchNorm (spatial tokens, no pooling), the normalized state as qpos, a CVAE style encoder over the action chunk in
|
| 287 |
+
training, the DETR decoder with `horizon` queries; loss L1 + kl_weight x KL; inference decodes from the zero
|
| 288 |
+
latent (deterministic)."""
|
| 289 |
+
name = 'act'
|
| 290 |
+
backbone_prefix = 'model.backbone.'
|
| 291 |
+
|
| 292 |
+
def __init__(self, cfg: PolicyConfig, init_weights=None):
|
| 293 |
+
super().__init__(cfg)
|
| 294 |
+
transformer = Transformer(d_model=cfg.act_hidden_dim, nhead=cfg.nheads, num_encoder_layers=cfg.enc_layers,
|
| 295 |
+
num_decoder_layers=cfg.dec_layers, dim_feedforward=cfg.dim_feedforward,
|
| 296 |
+
dropout=cfg.dropout, return_intermediate_dec=False)
|
| 297 |
+
self.model = DETRVAE(build_backbone(cfg.backbone, hidden_dim=cfg.act_hidden_dim, weights=init_weights),
|
| 298 |
+
transformer,
|
| 299 |
+
build_style_encoder(cfg.act_hidden_dim, cfg.nheads, cfg.dim_feedforward, cfg.enc_layers,
|
| 300 |
+
cfg.dropout),
|
| 301 |
+
qpos_dim=cfg.state_dim, action_dim=cfg.action_dim, num_queries=cfg.horizon,
|
| 302 |
+
latent_dim=cfg.latent_dim)
|
| 303 |
+
self.register_buffer('mean', torch.tensor(IMAGENET_MEAN).view(1, 1, 3, 1, 1), persistent=False)
|
| 304 |
+
self.register_buffer('std', torch.tensor(IMAGENET_STD).view(1, 1, 3, 1, 1), persistent=False)
|
| 305 |
+
|
| 306 |
+
def compute_loss(self, images, state, action):
|
| 307 |
+
target = self.action_norm.normalize(action)
|
| 308 |
+
a_hat, (mu, logvar) = self.model(self.state_norm.normalize(state), (images - self.mean) / self.std,
|
| 309 |
+
actions=target)
|
| 310 |
+
l1 = F.l1_loss(a_hat, target)
|
| 311 |
+
kl = kl_divergence(mu, logvar)
|
| 312 |
+
return l1 + self.cfg.kl_weight * kl, dict(l1=float(l1.detach()), kl=float(kl.detach()))
|
| 313 |
+
|
| 314 |
+
@torch.no_grad()
|
| 315 |
+
def predict(self, images, state, generator=None): # noqa: ARG002 - deterministic (zero latent)
|
| 316 |
+
a_hat, _ = self.model(self.state_norm.normalize(state), (images - self.mean) / self.std)
|
| 317 |
+
return self.action_norm.unnormalize(a_hat), a_hat
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
class ODEPolicy(BasePolicy):
|
| 321 |
+
"""ODE policy as ODE Policy's G1 port (`SonicLatentODE`): the body part b of the action row (the first
|
| 322 |
+
ode_body_dim columns; G1 the SONIC motion token 64) is integrated with Euler, one row per unit of time,
|
| 323 |
+
b_{k+1} = b_k + field_scale * f(b_k, s | c), from b_0 = the body row before the chunk; the remaining columns (G1:
|
| 324 |
+
the measured DFX6 12) are decoded from c for every row (linear, SiLU, linear; continuous, no sigmoid). c =
|
| 325 |
+
Linear(LayerNorm(image features)): one ResNet18 per view (ODE Policy's encoder, in place of the G1 port's GR00T
|
| 326 |
+
reader); the state enters the field only, never the condition or the hands.
|
| 327 |
+
|
| 328 |
+
Normalization (the G1 port's): per-dimension q01 / q99 of the training rows to [-1, 1], the UNIT_RANGE columns
|
| 329 |
+
(DFX6) fixed at [0, 1], constant dimensions shifted to 0, clipped to [-5, 5]; the executed body row at inference is
|
| 330 |
+
not clipped (a carried endpoint may leave the interval). Start: training teacher-forces b_0 = the recorded body row
|
| 331 |
+
t-1, the normalized-zero BOS at an episode's first frame; execution starts from the body part of the row executed
|
| 332 |
+
at t-1 (the interface's past_actions[-1]), BOS without one. Loss: masked MSE in normalized units (rows past the
|
| 333 |
+
episode's end left out), body and hands weighted by their widths. The ODE head runs in FP32 (the encoder under the
|
| 334 |
+
caller's autocast). Deterministic; no start perturbation (the G1 port's)."""
|
| 335 |
+
name = 'ode_mlp'
|
| 336 |
+
field_arch = 'mlp'
|
| 337 |
+
backbone_prefix = 'obs_encoder.rgb.'
|
| 338 |
+
lead_rows = 1
|
| 339 |
+
CLIP = 5.0
|
| 340 |
+
|
| 341 |
+
def __init__(self, cfg: PolicyConfig, init_weights=None):
|
| 342 |
+
super().__init__(cfg)
|
| 343 |
+
if cfg.ode_body_dim is None or not 0 < cfg.ode_body_dim <= cfg.action_dim:
|
| 344 |
+
raise ValueError(f'ode_body_dim must be in 1..{cfg.action_dim}, got {cfg.ode_body_dim}')
|
| 345 |
+
body, hands = cfg.ode_body_dim, cfg.action_dim - cfg.ode_body_dim
|
| 346 |
+
self.obs_encoder = ImageStateEncoder(cfg.n_cameras, 0, backbone=cfg.backbone, weights=init_weights,
|
| 347 |
+
norm=cfg.backbone_norm, shared=False) # images only
|
| 348 |
+
self.context_norm = nn.LayerNorm(self.obs_encoder.feature_dim)
|
| 349 |
+
self.context_proj = nn.Linear(self.obs_encoder.feature_dim, cfg.ode_cond_dim)
|
| 350 |
+
if self.field_arch == 'dit':
|
| 351 |
+
self.field = DiTVectorField(cfg.ode_cond_dim, cfg.state_dim, cfg.ode_dit_hidden, cfg.ode_dit_layers, body,
|
| 352 |
+
body, num_heads=cfg.ode_dit_heads, n_tokens=cfg.ode_dit_tokens)
|
| 353 |
+
else:
|
| 354 |
+
self.field = VectorField(cfg.ode_cond_dim, cfg.state_dim, cfg.ode_width, cfg.ode_layers, body, body)
|
| 355 |
+
self.hand_hidden = nn.Linear(cfg.ode_cond_dim, cfg.ode_cond_dim)
|
| 356 |
+
self.hand_output = nn.Linear(cfg.ode_cond_dim, cfg.horizon * hands) if hands else None
|
| 357 |
+
|
| 358 |
+
def fit_normalizers(self, stats: dict):
|
| 359 |
+
"""The G1 port's bounds: q01 / q99 (from stats, else min / max), the stats' unit_dims fixed at [0, 1]."""
|
| 360 |
+
for key, norm in (('state', self.state_norm), ('action', self.action_norm)):
|
| 361 |
+
entry = stats[key]
|
| 362 |
+
lo = torch.as_tensor(entry.get('q01', entry['min']), dtype=torch.float64).clone()
|
| 363 |
+
hi = torch.as_tensor(entry.get('q99', entry['max']), dtype=torch.float64).clone()
|
| 364 |
+
unit = torch.as_tensor(entry.get('unit_dims', []), dtype=torch.long)
|
| 365 |
+
lo[unit], hi[unit] = 0.0, 1.0
|
| 366 |
+
norm.fit(lo, hi)
|
| 367 |
+
|
| 368 |
+
@property
|
| 369 |
+
def sampling_steps(self) -> int:
|
| 370 |
+
"""Euler steps (field calls) per query."""
|
| 371 |
+
return int(self.cfg.horizon)
|
| 372 |
+
|
| 373 |
+
def features(self, images):
|
| 374 |
+
return self.obs_encoder(images, images.new_zeros(images.shape[0], 0))
|
| 375 |
+
|
| 376 |
+
def head(self, features, s, b0, n_steps):
|
| 377 |
+
"""FP32: (body path (B, n_steps, body), hands (B, n_steps, hands)) in normalized units."""
|
| 378 |
+
cfg = self.cfg
|
| 379 |
+
c = self.context_proj(self.context_norm(features.float()))
|
| 380 |
+
film = self.field.precompute(c) # c is fixed over the chunk
|
| 381 |
+
b, path = b0, []
|
| 382 |
+
for _ in range(n_steps): # Euler, dt = one row
|
| 383 |
+
b = b + cfg.ode_field_scale * self.field(b, s, c, film)
|
| 384 |
+
path.append(b)
|
| 385 |
+
path = torch.stack(path, dim=1)
|
| 386 |
+
hands = cfg.action_dim - cfg.ode_body_dim
|
| 387 |
+
if not hands:
|
| 388 |
+
return path, path[..., :0]
|
| 389 |
+
out = self.hand_output(F.silu(self.hand_hidden(c))).view(c.shape[0], cfg.horizon, hands)
|
| 390 |
+
return path, out[:, :n_steps]
|
| 391 |
+
|
| 392 |
+
def compute_loss(self, images, state, action, valid=None):
|
| 393 |
+
cfg = self.cfg
|
| 394 |
+
H, body = cfg.horizon, cfg.ode_body_dim
|
| 395 |
+
if action.shape[1] != H + 1:
|
| 396 |
+
raise ValueError(f'the ODE policy trains on the row before + {H} rows, got {action.shape[1]} rows')
|
| 397 |
+
valid = torch.ones(action.shape[:2], device=action.device) if valid is None else valid.to(action.device)
|
| 398 |
+
features = self.features(images)
|
| 399 |
+
with torch.autocast(device_type=images.device.type, enabled=False):
|
| 400 |
+
s = self.state_norm.normalize(state.float()).clamp(-self.CLIP, self.CLIP)
|
| 401 |
+
nact = self.action_norm.normalize(action.float()).clamp(-self.CLIP, self.CLIP)
|
| 402 |
+
b0 = nact[:, 0, :body] * valid[:, :1].float() # BOS (normalized zero) at an episode's first frame
|
| 403 |
+
path, hands = self.head(features, s, b0, H)
|
| 404 |
+
target, mask = nact[:, 1:], valid[:, 1:, None].float()
|
| 405 |
+
|
| 406 |
+
def masked(pred, goal):
|
| 407 |
+
m = mask.expand_as(goal)
|
| 408 |
+
return ((pred - goal).square() * m).sum() / m.sum().clamp_min(1)
|
| 409 |
+
|
| 410 |
+
body_loss = masked(path, target[..., :body])
|
| 411 |
+
hand_loss = masked(hands, target[..., body:]) if hands.shape[-1] else body_loss.new_zeros(())
|
| 412 |
+
loss = (body * body_loss + (cfg.action_dim - body) * hand_loss) / cfg.action_dim
|
| 413 |
+
return loss, dict(body=float(body_loss.detach()), hand=float(hand_loss.detach()))
|
| 414 |
+
|
| 415 |
+
@torch.no_grad()
|
| 416 |
+
def predict(self, images, state, generator=None, previous=None, has_previous=None): # noqa: ARG002
|
| 417 |
+
"""previous: (B, action_dim) physical, the row executed at t-1 (its body part is the start); None, or a False
|
| 418 |
+
in has_previous (B,), starts from the BOS."""
|
| 419 |
+
cfg = self.cfg
|
| 420 |
+
features = self.features(images)
|
| 421 |
+
with torch.autocast(device_type=images.device.type, enabled=False):
|
| 422 |
+
s = self.state_norm.normalize(state.float()).clamp(-self.CLIP, self.CLIP)
|
| 423 |
+
b0 = features.new_zeros(images.shape[0], cfg.ode_body_dim, dtype=torch.float32)
|
| 424 |
+
if previous is not None:
|
| 425 |
+
start = self.action_norm.normalize(previous.to(device=images.device, dtype=torch.float32))
|
| 426 |
+
keep = (torch.ones(images.shape[0], device=images.device) if has_previous is None else
|
| 427 |
+
has_previous.to(images.device).float())
|
| 428 |
+
b0 = start[:, :cfg.ode_body_dim] * keep[:, None] # unclipped carry
|
| 429 |
+
path, hands = self.head(features, s, b0, cfg.horizon)
|
| 430 |
+
raw = torch.cat([path, hands], dim=-1)
|
| 431 |
+
return self.action_norm.unnormalize(raw), raw
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
class ODEDiTPolicy(ODEPolicy):
|
| 435 |
+
"""ODE-DiT: the ODE policy with ODE Policy's DiT (adaLN) vector field (ode_dit.yaml) over [b, s]."""
|
| 436 |
+
name = 'ode_dit'
|
| 437 |
+
field_arch = 'dit'
|
| 438 |
+
|
| 439 |
+
|
| 440 |
+
from .flash import FlashPolicy # noqa: E402 - FLASH (flash.py) builds on this module's Normalizer and nets.py
|
| 441 |
+
|
| 442 |
+
POLICIES = {cls.name: cls for cls in (FMDiTPolicy, DPPolicy, ACTPolicy, FlashPolicy, ODEPolicy, ODEDiTPolicy)}
|
| 443 |
+
LABELS = {'fm_dit': 'FM-DiT', 'dp': 'DP (DDPM-DiT)', 'act': 'ACT', 'flash': 'FLASH', 'ode_mlp': 'ODE-MLP',
|
| 444 |
+
'ode_dit': 'ODE-DiT'}
|
| 445 |
+
|
| 446 |
+
|
| 447 |
+
def build_policy(cfg: PolicyConfig | dict, pretrained: bool = True) -> BasePolicy:
|
| 448 |
+
"""The policy of `cfg`; pretrained=True initializes the backbone from cfg.backbone_weights (training),
|
| 449 |
+
False builds the same structure with random weights (a checkpoint load, which must not download anything)."""
|
| 450 |
+
cfg = cfg if isinstance(cfg, PolicyConfig) else PolicyConfig.from_dict(cfg)
|
| 451 |
+
if cfg.policy not in POLICIES:
|
| 452 |
+
raise KeyError(f'unknown baseline {cfg.policy!r}; one of {sorted(POLICIES)}')
|
| 453 |
+
cfg = replace(cfg) # a copy (resolved backbone_norm)
|
| 454 |
+
return POLICIES[cfg.policy](cfg, init_weights=cfg.backbone_weights if pretrained else None)
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/requirements.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Environment of the FM-DiT / DP / ACT baselines (training and the policy server), Python 3.12, CUDA 12.8 wheels:
|
| 2 |
+
# uv venv <env> --python 3.12
|
| 3 |
+
# uv pip install --python <env>/bin/python -r evaluation/baselines/requirements.txt \
|
| 4 |
+
# --extra-index-url https://download.pytorch.org/whl/cu128 --index-strategy unsafe-best-match
|
| 5 |
+
torch==2.9.0+cu128
|
| 6 |
+
torchvision==0.24.0+cu128
|
| 7 |
+
diffusers==0.35.1
|
| 8 |
+
av==15.1.0
|
| 9 |
+
pyarrow==23.0.1
|
| 10 |
+
numpy==2.2.6
|
| 11 |
+
opencv-python-headless==4.11.0.86
|
| 12 |
+
pytest==8.4.2
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/runtime.py
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Checkpoints and inference of the baselines.
|
| 2 |
+
|
| 3 |
+
A checkpoint is a directory written by train.py (`<run>/checkpoints/step-NNNNNN/`, `final` links the last one):
|
| 4 |
+
|
| 5 |
+
- `model.pt`: torch.save of {format, config (the config.json text), state_dict}: the EMA weights (or the raw ones when
|
| 6 |
+
EMA is off) with the policy's state and action normalizers, loaded strictly with `weights_only=True`;
|
| 7 |
+
- `config.json`: the policy configuration, the contract (robot, cameras, state and action columns), the image size,
|
| 8 |
+
the training task text, dataset, episodes, recipe and statistics;
|
| 9 |
+
- `protocol.json`: model.pt's size and SHA-256.
|
| 10 |
+
|
| 11 |
+
`BaselinePolicy.predict` takes the live frames of the checkpoint's cameras (any size; resized with data.resize_frame,
|
| 12 |
+
as the training cache), the physical state of the contract, a seed and, for a policy that starts from it (the ODE
|
| 13 |
+
policies, `uses_previous`), the action row executed at the frame before; it returns the physical (horizon,
|
| 14 |
+
action_dim) chunk with its normalized form; row 0 is the action of the observation's frame.
|
| 15 |
+
"""
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
import hashlib
|
| 19 |
+
import json
|
| 20 |
+
from pathlib import Path
|
| 21 |
+
|
| 22 |
+
import numpy as np
|
| 23 |
+
|
| 24 |
+
FORMAT = 'hb_baselines/1'
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def sha256(path) -> str:
|
| 28 |
+
digest = hashlib.sha256()
|
| 29 |
+
with Path(path).open('rb') as stream:
|
| 30 |
+
for block in iter(lambda: stream.read(16 << 20), b''):
|
| 31 |
+
digest.update(block)
|
| 32 |
+
return digest.hexdigest()
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def save_checkpoint(folder, policy, config: dict):
|
| 36 |
+
"""Write model.pt, config.json and protocol.json of `policy` (an nn.Module) into `folder`."""
|
| 37 |
+
import torch
|
| 38 |
+
folder = Path(folder)
|
| 39 |
+
folder.mkdir(parents=True, exist_ok=True)
|
| 40 |
+
text = json.dumps(dict(config, format=FORMAT), indent=1)
|
| 41 |
+
state = {k: v.detach().cpu().contiguous() for k, v in policy.state_dict().items()}
|
| 42 |
+
torch.save(dict(format=FORMAT, config=text, state_dict=state), folder / 'model.pt.tmp')
|
| 43 |
+
(folder / 'model.pt.tmp').replace(folder / 'model.pt')
|
| 44 |
+
(folder / 'config.json').write_text(text)
|
| 45 |
+
(folder / 'protocol.json').write_text(json.dumps(dict(
|
| 46 |
+
format=FORMAT, step=config.get('step'), policy=config['policy']['policy'],
|
| 47 |
+
files={'model.pt': dict(bytes=(folder / 'model.pt').stat().st_size, sha256=sha256(folder / 'model.pt'))}),
|
| 48 |
+
indent=1))
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def load_checkpoint(folder, device='cpu', verify=True):
|
| 52 |
+
"""(policy in eval mode on `device`, config dict) of a checkpoint directory."""
|
| 53 |
+
import torch
|
| 54 |
+
from .policies import build_policy
|
| 55 |
+
folder = Path(folder)
|
| 56 |
+
if verify:
|
| 57 |
+
protocol = json.loads((folder / 'protocol.json').read_text())
|
| 58 |
+
entry = protocol['files']['model.pt']
|
| 59 |
+
if (folder / 'model.pt').stat().st_size != entry['bytes']:
|
| 60 |
+
raise ValueError(f'{folder}/model.pt differs from protocol.json')
|
| 61 |
+
payload = torch.load(folder / 'model.pt', map_location='cpu', weights_only=True)
|
| 62 |
+
if payload.get('format') != FORMAT:
|
| 63 |
+
raise ValueError(f"{folder}: format {payload.get('format')!r}, expected {FORMAT}")
|
| 64 |
+
config = json.loads(payload['config'])
|
| 65 |
+
if json.loads((folder / 'config.json').read_text()) != config:
|
| 66 |
+
raise ValueError(f'{folder}: config.json differs from the one inside model.pt')
|
| 67 |
+
policy = build_policy(config['policy'], pretrained=False) # every weight comes from model.pt
|
| 68 |
+
policy.load_state_dict(payload['state_dict'], strict=True)
|
| 69 |
+
return policy.to(device).eval(), config
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
class BaselinePolicy:
|
| 73 |
+
"""A loaded checkpoint for closed-loop inference (one request at a time)."""
|
| 74 |
+
|
| 75 |
+
def __init__(self, checkpoint, device='cuda:0', policy: str | None = None, robot: str | None = None):
|
| 76 |
+
import torch
|
| 77 |
+
self.torch = torch
|
| 78 |
+
self.device = torch.device(device)
|
| 79 |
+
self.model, self.config = load_checkpoint(checkpoint, device=self.device)
|
| 80 |
+
self.checkpoint = str(Path(checkpoint).resolve())
|
| 81 |
+
name, contract = self.config['policy']['policy'], self.config['contract']
|
| 82 |
+
if policy is not None and name != policy:
|
| 83 |
+
raise ValueError(f'{checkpoint} is a {name!r} checkpoint, not {policy!r}')
|
| 84 |
+
if robot is not None and contract['robot'] != robot:
|
| 85 |
+
raise ValueError(f"{checkpoint} was trained for {contract['robot']!r} ({contract['name']}), not {robot!r}")
|
| 86 |
+
self.name, self.contract = name, contract
|
| 87 |
+
self.cameras = tuple(contract['cameras'])
|
| 88 |
+
self.image_hw = tuple(self.config['image_hw'])
|
| 89 |
+
self.horizon = int(self.config['policy']['horizon'])
|
| 90 |
+
self.state_dim, self.action_dim = int(contract['state_dim']), int(contract['action_dim'])
|
| 91 |
+
self.sampling_steps = int(self.model.sampling_steps)
|
| 92 |
+
self.task_text = self.config.get('task_text')
|
| 93 |
+
self.uses_previous = bool(getattr(self.model, 'lead_rows', 0))
|
| 94 |
+
|
| 95 |
+
def info(self) -> dict:
|
| 96 |
+
out = dict(model=self.name, checkpoint=self.checkpoint, step=self.config.get('step'),
|
| 97 |
+
contract=self.contract['name'], views=list(self.cameras), image_hw=list(self.image_hw),
|
| 98 |
+
action_chunk=self.horizon, action_dim=self.action_dim, state_dim=self.state_dim,
|
| 99 |
+
sampling_steps=self.sampling_steps, task_text=self.task_text,
|
| 100 |
+
training_data=self.config.get('dataset', {}).get('name'))
|
| 101 |
+
if self.name == 'flash':
|
| 102 |
+
out['flash'] = dict(self.model.flash, history_rows=self.model.history_span)
|
| 103 |
+
if self.uses_previous:
|
| 104 |
+
out['starts_from'] = 'the body part of the row executed at t-1, else the normalized-zero BOS'
|
| 105 |
+
return out
|
| 106 |
+
|
| 107 |
+
def history(self, past_actions, history_valid):
|
| 108 |
+
"""FLASH: (history (1, n_history, Da), has_history (1,)) tensors from the executed rows before the query
|
| 109 |
+
(past_actions (N, Da) oldest first, row N-1 = frame t-1; history_valid (N,) a contiguous valid suffix)."""
|
| 110 |
+
from .flash import history_rows
|
| 111 |
+
torch, span = self.torch, self.model.history_span
|
| 112 |
+
rows = np.asarray(past_actions, np.float32)
|
| 113 |
+
valid = np.asarray(history_valid, np.float32).reshape(-1) > 0.5
|
| 114 |
+
if rows.ndim != 2 or rows.shape[1] != self.action_dim or len(valid) != len(rows):
|
| 115 |
+
raise ValueError(f'past_actions {rows.shape} / history_valid {valid.shape}: '
|
| 116 |
+
f'expected (N, {self.action_dim})')
|
| 117 |
+
if len(rows) < span: # fewer rows than the history reaches back: the missing older rows are invalid
|
| 118 |
+
pad = span - len(rows)
|
| 119 |
+
rows = np.concatenate([np.zeros((pad, rows.shape[1]), np.float32), rows])
|
| 120 |
+
valid = np.concatenate([np.zeros(pad, bool), valid])
|
| 121 |
+
hist, has = history_rows(rows[-span:], valid[-span:], self.model.stride, self.model.n_history)
|
| 122 |
+
return (torch.from_numpy(hist)[None].to(self.device),
|
| 123 |
+
torch.tensor([bool(has)], device=self.device))
|
| 124 |
+
|
| 125 |
+
def images_tensor(self, images: dict):
|
| 126 |
+
from .data import resize_frame
|
| 127 |
+
missing = [c for c in self.cameras if c not in images]
|
| 128 |
+
if missing:
|
| 129 |
+
raise KeyError(f'missing cameras {missing}; the checkpoint reads {list(self.cameras)}')
|
| 130 |
+
frames = np.stack([resize_frame(np.asarray(images[c]), self.image_hw) for c in self.cameras])
|
| 131 |
+
x = self.torch.from_numpy(frames).to(self.device).permute(0, 3, 1, 2).float().div_(255.)
|
| 132 |
+
return x.unsqueeze(0) # (1, n_cameras, 3, h, w)
|
| 133 |
+
|
| 134 |
+
def predict(self, images: dict, state, seed: int = 0, previous=None, past_actions=None, history_valid=None):
|
| 135 |
+
"""(action (horizon, action_dim) float32 physical, normalized form (FLASH: the polynomial coefficients)).
|
| 136 |
+
The ODE policies (`uses_previous`) start from `previous`, the physical action row executed at the frame before
|
| 137 |
+
(else the last row of past_actions when history_valid marks it; with neither, their BOS). FLASH needs
|
| 138 |
+
past_actions / history_valid (the interface's executed rows before the query). The others ignore all three."""
|
| 139 |
+
torch = self.torch
|
| 140 |
+
state = np.asarray(state, np.float32).reshape(-1)
|
| 141 |
+
if state.shape != (self.state_dim,) or not np.isfinite(state).all():
|
| 142 |
+
raise ValueError(f'expected a finite state of {self.state_dim} values, got {state.shape}')
|
| 143 |
+
args, kwargs = (), {}
|
| 144 |
+
if self.uses_previous:
|
| 145 |
+
if previous is None and past_actions is not None and history_valid is not None:
|
| 146 |
+
valid = np.asarray(history_valid, np.float32).reshape(-1)
|
| 147 |
+
if len(valid) and valid[-1] > 0.5:
|
| 148 |
+
previous = np.asarray(past_actions, np.float32)[-1]
|
| 149 |
+
if previous is not None:
|
| 150 |
+
previous = np.asarray(previous, np.float32).reshape(-1)
|
| 151 |
+
if previous.shape != (self.action_dim,) or not np.isfinite(previous).all():
|
| 152 |
+
raise ValueError(f'expected a finite previous action row of {self.action_dim} values, '
|
| 153 |
+
f'got {previous.shape}')
|
| 154 |
+
kwargs['previous'] = torch.from_numpy(previous)[None].to(self.device)
|
| 155 |
+
if self.name == 'flash':
|
| 156 |
+
if past_actions is None or history_valid is None:
|
| 157 |
+
raise ValueError('FLASH needs past_actions and history_valid (the executed rows before the query)')
|
| 158 |
+
args = self.history(past_actions, history_valid)
|
| 159 |
+
generator = torch.Generator(device=self.device)
|
| 160 |
+
generator.manual_seed(int(seed) % (2 ** 63 - 1))
|
| 161 |
+
with torch.inference_mode():
|
| 162 |
+
action, raw = self.model.predict(self.images_tensor(images),
|
| 163 |
+
torch.from_numpy(state)[None].to(self.device), *args,
|
| 164 |
+
generator=generator, **kwargs)
|
| 165 |
+
action = action[0].float().cpu().numpy()
|
| 166 |
+
if action.shape != (self.horizon, self.action_dim) or not np.isfinite(action).all():
|
| 167 |
+
raise ValueError(f'invalid prediction {action.shape}')
|
| 168 |
+
return np.ascontiguousarray(action, np.float32), raw[0].float().cpu().numpy().astype(np.float32)
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/baselines/train.py
ADDED
|
@@ -0,0 +1,552 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Train an FM-DiT, DP (DDPM-DiT), ACT, FLASH, ODE-MLP or ODE-DiT baseline on a task's LeRobot v2.1 expert dataset.
|
| 2 |
+
|
| 3 |
+
<baselines env>/bin/python -I evaluation/baselines/train.py --policy fm_dit --contract h2_sharpa \\
|
| 4 |
+
--dataset data/h2_pour_water/h2_pour_water_r1/lerobot --out <run dir> --steps 60000
|
| 5 |
+
|
| 6 |
+
The recipe is DextraVerse's shared IL recipe (configs/algorithm/il/train.yaml; runners/train_dex_flow_matching.py):
|
| 7 |
+
AdamW (lr 1e-4, betas 0.95/0.999, weight decay 1e-6), cosine decay (here after a 500-step linear warm-up, as
|
| 8 |
+
Diffusion Policy), whole-policy EMA (Diffusion Policy's warm-up schedule, max decay 0.9999) whose weights are the
|
| 9 |
+
saved checkpoint, batch 64, one observation frame and 16-row chunks. Added for the humanoid views: frames resized
|
| 10 |
+
to 168x224 (the 480x640 aspect). bf16 autocast on CUDA.
|
| 11 |
+
|
| 12 |
+
FLASH (--policy flash, evaluation/baselines/flash.py) keeps its upstream recipe (FLASH-Policy f47e490,
|
| 13 |
+
default_train.yaml + flash.yaml) where the defaults differ: seed 42 (upstream's; the protocol keeps each model's
|
| 14 |
+
official seed), ResNet18 from scratch with GroupNorm trained at the full learning rate (--backbone-weights none,
|
| 15 |
+
--backbone-lr-scale 1), diffusers' cosine schedule with a 500-step warm-up, Diffusion Policy's EMAModel decay as
|
| 16 |
+
upstream counts it, and its own items (FlashChunkDataset: the polynomial targets at the sampling stride, the executed
|
| 17 |
+
history). --flash KEY=VALUE changes a FLASH setting (flash.FLASH_DEFAULTS: stride, n_history, ...). Its augmentation
|
| 18 |
+
stream is seeded from the training seed, as every model's (ChunkDataset aug_seed; logged as HB_AUG_SEED=<seed>).
|
| 19 |
+
|
| 20 |
+
ODE-MLP / ODE-DiT (--policy ode_mlp / ode_dit, policies.ODEPolicy) keep their G1 port's choices
|
| 21 |
+
(policies.POLICY_DEFAULTS): 16-row chunks, the ODE head in FP32, their own normalization bounds (q01 / q99 of the
|
| 22 |
+
training rows, the DFX6 hands fixed at [0, 1]: stats q01 / q99 / unit_dims), the body part = the contract's first
|
| 23 |
+
action group, the encoder from scratch at the full learning rate, seed 42 (ODE Policy's default_train.yaml, whose
|
| 24 |
+
optimizer, schedule and EMA are the recipe above). Their items carry the row before t and the rows' validity
|
| 25 |
+
(ChunkDataset lead 1).
|
| 26 |
+
|
| 27 |
+
Augmentation (2026-11-16): the Humanoid Benchmark spec v2 (docs/augmentation_v2.md, evaluation/augmentation), the
|
| 28 |
+
same for every model of the benchmark, is on by default (--augmentation hb-v2): per training item one hb_aug_v2 call
|
| 29 |
+
on the cached 168x224 frames of all cameras (colour shared, geometry / light patches / white balance per camera, one
|
| 30 |
+
of the 15 effects boosted 1.5 x) and the per-sample joint bias (+-2 deg) + noise (0.25 deg, clipped 3 sigma) on the
|
| 31 |
+
body joint angles of the raw state (G1 29, H2 31), before the policy's normalizers; actions untouched. The native
|
| 32 |
+
random shift is off (--shift 0; a shift with hb-v2 is refused). Before the first step a preflight reads training items
|
| 33 |
+
through the augmented and the plain path and checks the state width (G1 44 / H2 78, no velocity), that only the body
|
| 34 |
+
joints move and by at most 2.75 deg, that the action rows (and FLASH's history) are bit-identical, that the images
|
| 35 |
+
change, and that the offline-check items are deterministic; it is stored in run.json (--preflight-only stops after it).
|
| 36 |
+
--augmentation none is an explicit exception to the spec, recorded in run.json and the checkpoints. The ResNet18
|
| 37 |
+
starts from torchvision's ImageNet-1k weights (--backbone-weights IMAGENET1K_V1, downloaded once to the torch hub
|
| 38 |
+
cache) and is fine-tuned at 0.1 x the learning rate (--backbone-lr-scale, the DETR practice) with its BatchNorm
|
| 39 |
+
frozen; --backbone-weights none trains it from scratch (DextraVerse's GroupNorm encoder for FM-DiT and DP).
|
| 40 |
+
|
| 41 |
+
In-training MSE (owner 2026-11-22, HumanWAM hb_training/REPRODUCIBILITY.md section 6): --inloop-task <key> with
|
| 42 |
+
--inloop-code <HumanWAM hb_training/eval-action-mse> evaluates the saved (EMA) weights every HB_INLOOP_EVERY (250)
|
| 43 |
+
steps on the protocol's cached episodes (inloop.py) into <out>/logs/inloop-mse.jsonl. FLASH refuses to train without
|
| 44 |
+
it unless --allow-no-inloop (an exception to the protocol, recorded in run.json); so do the ODE policies.
|
| 45 |
+
|
| 46 |
+
Writes into --out: run.json (arguments), train_log.jsonl, checkpoints/step-NNNNNN/ every --save-every steps and at the
|
| 47 |
+
end (runtime.py format), checkpoints/final -> the last one, and train_state.pt (optimizer, schedule, EMA, step) that
|
| 48 |
+
--resume continues from. Each save also measures the EMA policy offline on fixed frames (held-out episodes with
|
| 49 |
+
--val-episodes, else training frames): normalized-action MSE overall and per action group.
|
| 50 |
+
"""
|
| 51 |
+
from __future__ import annotations
|
| 52 |
+
|
| 53 |
+
import argparse
|
| 54 |
+
import copy
|
| 55 |
+
from datetime import datetime
|
| 56 |
+
import json
|
| 57 |
+
import math
|
| 58 |
+
import os
|
| 59 |
+
from pathlib import Path
|
| 60 |
+
import subprocess
|
| 61 |
+
import sys
|
| 62 |
+
import time
|
| 63 |
+
|
| 64 |
+
import numpy as np
|
| 65 |
+
|
| 66 |
+
HERE = Path(__file__).resolve().parent
|
| 67 |
+
REPO = HERE.parents[1]
|
| 68 |
+
if str(HERE.parent) not in sys.path:
|
| 69 |
+
sys.path.insert(0, str(HERE.parent))
|
| 70 |
+
|
| 71 |
+
from baselines.data import (CONTRACTS, ChunkDataset, FlashChunkDataset, LeRobotDataset, # noqa: E402
|
| 72 |
+
augmentation_module, frame_cache, load_lowdim, parse_episodes, statistics,
|
| 73 |
+
unit_range_dims)
|
| 74 |
+
from baselines.flash import FLASH_DEFAULTS, FLASH_POLICY_FIELDS # noqa: E402
|
| 75 |
+
from baselines.policies import ODE_POLICIES, POLICIES, POLICY_DEFAULTS, PolicyConfig, build_policy # noqa: E402
|
| 76 |
+
from baselines.runtime import save_checkpoint # noqa: E402
|
| 77 |
+
|
| 78 |
+
DEFAULTS = dict(lr=1e-4, betas=(0.95, 0.999), weight_decay=1e-6, warmup=500, ema=0.9999, batch_size=64,
|
| 79 |
+
horizon=16, backbone_weights='IMAGENET1K_V1', backbone_lr_scale=0.1, seed=0, amp=True)
|
| 80 |
+
# FLASH-Policy f47e490 default_train.yaml / flash.yaml where they differ from DEFAULTS
|
| 81 |
+
FLASH_TRAINING = dict(seed=42, backbone_weights=None, backbone_lr_scale=1.0, schedule='diffusers_cosine',
|
| 82 |
+
ema_schedule='diffusion_policy_emamodel')
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
def training_defaults(policy: str) -> dict:
|
| 86 |
+
"""DEFAULTS with the policy's own: FLASH_TRAINING (flash), policies.POLICY_DEFAULTS (the ODE policies)."""
|
| 87 |
+
return dict(DEFAULTS, **(FLASH_TRAINING if policy == 'flash' else {}), **POLICY_DEFAULTS.get(policy, {}))
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
def policy_default(policy: str, key: str):
|
| 91 |
+
"""The training default of `key` for `policy`."""
|
| 92 |
+
return training_defaults(policy)[key]
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def same_policy_config(saved: dict, current: dict) -> bool:
|
| 96 |
+
"""A saved policy configuration matches the current one; a field added to PolicyConfig after the save (absent
|
| 97 |
+
from it) matches when the current value is that field's default (e.g. the ode_* fields for an older FM-DiT run)."""
|
| 98 |
+
from dataclasses import MISSING, fields
|
| 99 |
+
defaults = {f.name: f.default for f in fields(PolicyConfig) if f.default is not MISSING}
|
| 100 |
+
return all(saved[k] == v if k in saved else (k in defaults and defaults[k] == v) for k, v in current.items()) \
|
| 101 |
+
and set(saved) <= set(current)
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
def git_commit():
|
| 105 |
+
try:
|
| 106 |
+
return subprocess.run(['git', '-C', str(REPO), 'rev-parse', 'HEAD'], capture_output=True, text=True,
|
| 107 |
+
check=True).stdout.strip()
|
| 108 |
+
except Exception: # noqa: BLE001 - outside a checkout
|
| 109 |
+
return None
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
def parse_hw(text):
|
| 113 |
+
h, w = text.lower().split('x')
|
| 114 |
+
return int(h), int(w)
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
def random_shift(images, pad):
|
| 118 |
+
"""DrQ random shift: replicate-pad by `pad` pixels and crop back at a random offset per sample.
|
| 119 |
+
images (B, N, 3, H, W) float."""
|
| 120 |
+
import torch
|
| 121 |
+
import torch.nn.functional as F
|
| 122 |
+
if pad <= 0:
|
| 123 |
+
return images
|
| 124 |
+
B, N, C, H, W = images.shape
|
| 125 |
+
x = F.pad(images.reshape(B * N, C, H, W), (pad,) * 4, mode='replicate')
|
| 126 |
+
oy = torch.randint(0, 2 * pad + 1, (B * N,), device=images.device)
|
| 127 |
+
ox = torch.randint(0, 2 * pad + 1, (B * N,), device=images.device)
|
| 128 |
+
rows = (oy[:, None] + torch.arange(H, device=images.device)[None])[:, None, :, None].expand(-1, C, -1, W + 2 * pad)
|
| 129 |
+
x = x.gather(2, rows)
|
| 130 |
+
cols = (ox[:, None] + torch.arange(W, device=images.device)[None])[:, None, None, :].expand(-1, C, H, -1)
|
| 131 |
+
return x.gather(3, cols).reshape(B, N, C, H, W)
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
class EMA:
|
| 135 |
+
"""Diffusion Policy's EMAModel schedule: decay = min(max_decay, 1 - (1 + step) ** -0.75), parameters averaged,
|
| 136 |
+
buffers (normalizers) copied. schedule 'diffusion_policy_emamodel' counts the steps as upstream's EMAModel does
|
| 137 |
+
(decay 0 for the first two updates, then 1 - (step - 1) ** -0.75; FLASH)."""
|
| 138 |
+
|
| 139 |
+
def __init__(self, model, max_decay, schedule='hb'):
|
| 140 |
+
self.model = copy.deepcopy(model).eval().requires_grad_(False)
|
| 141 |
+
self.max_decay = float(max_decay)
|
| 142 |
+
self.schedule = schedule
|
| 143 |
+
|
| 144 |
+
def decay(self, step):
|
| 145 |
+
if self.schedule == 'diffusion_policy_emamodel':
|
| 146 |
+
return 0.0 if step <= 2 else min(self.max_decay, max(0.0, 1 - (step - 1) ** -0.75))
|
| 147 |
+
return 0.0 if step <= 0 else min(self.max_decay, max(0.0, 1 - (1 + step) ** -0.75))
|
| 148 |
+
|
| 149 |
+
def update(self, model, step):
|
| 150 |
+
import torch
|
| 151 |
+
decay = self.decay(step)
|
| 152 |
+
with torch.no_grad():
|
| 153 |
+
for e, p in zip(self.model.parameters(), model.parameters()):
|
| 154 |
+
e.mul_(decay).add_(p.detach(), alpha=1 - decay)
|
| 155 |
+
for e, b in zip(self.model.buffers(), model.buffers()):
|
| 156 |
+
e.copy_(b)
|
| 157 |
+
return decay
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
def preflight(train_set, eval_set, contract, samples=64, seed=0) -> dict:
|
| 161 |
+
"""Training items of `train_set` (augmented unless its body_dims is 0) against the same frames read without
|
| 162 |
+
augmentation, and two reads of the offline-check items; raises on any violation of docs/augmentation_v2.md.
|
| 163 |
+
Items are (images, state, *labels): every label (action rows; FLASH's polynomial rows and history) must be
|
| 164 |
+
bit-identical to the plain read."""
|
| 165 |
+
import torch
|
| 166 |
+
plain = train_set.plain() # the same frames without augmentation
|
| 167 |
+
picks = np.random.default_rng(seed).choice(len(plain), size=min(samples, len(plain)), replace=False)
|
| 168 |
+
nb, sd = train_set.body_dims, contract.state_dim
|
| 169 |
+
limit = augmentation_module().max_body_offset_rad() * (1 + 1e-5)
|
| 170 |
+
images_changed = body_moved = 0
|
| 171 |
+
worst = 0.0
|
| 172 |
+
for k in picks:
|
| 173 |
+
(im, st, *lab), (im0, st0, *lab0) = train_set[int(k)], plain[int(k)]
|
| 174 |
+
if st.shape != (sd,) or st0.shape != (sd,) or [x.shape for x in lab] != [x.shape for x in lab0]:
|
| 175 |
+
raise SystemExit(f'preflight: state {tuple(st.shape)} / labels {[tuple(x.shape) for x in lab]}, '
|
| 176 |
+
f'expected ({sd},)')
|
| 177 |
+
if not all(torch.equal(a, b) for a, b in zip(lab, lab0)):
|
| 178 |
+
raise SystemExit('preflight: an action label differs from the recorded data')
|
| 179 |
+
if not torch.equal(st[nb:], st0[nb:]):
|
| 180 |
+
raise SystemExit(f'preflight: a state value past the {nb} body joints changed')
|
| 181 |
+
delta = (st[:nb].double() - st0[:nb].double()).abs()
|
| 182 |
+
if nb:
|
| 183 |
+
worst = max(worst, float(delta.max()))
|
| 184 |
+
if worst > limit:
|
| 185 |
+
raise SystemExit(f'preflight: a body joint moved {math.degrees(worst):.3f} deg (> 2.75)')
|
| 186 |
+
body_moved += int((delta > 0).sum())
|
| 187 |
+
images_changed += int(not torch.equal(im, im0))
|
| 188 |
+
n = len(picks)
|
| 189 |
+
moved = body_moved / max(1, n * nb)
|
| 190 |
+
if nb and (images_changed < 0.9 * n or moved < 0.95):
|
| 191 |
+
raise SystemExit(f'preflight: augmentation inactive ({images_changed}/{n} images changed, {moved:.3f} of the '
|
| 192 |
+
'body joint values moved)')
|
| 193 |
+
if not nb and (images_changed or worst):
|
| 194 |
+
raise SystemExit('preflight: items changed with the augmentation off')
|
| 195 |
+
eval_picks = np.random.default_rng(seed + 1).choice(len(eval_set), size=min(8, len(eval_set)), replace=False)
|
| 196 |
+
for k in eval_picks:
|
| 197 |
+
a, b = eval_set[int(k)], eval_set[int(k)]
|
| 198 |
+
if eval_set.body_dims or not all(torch.equal(x, y) for x, y in zip(a, b)):
|
| 199 |
+
raise SystemExit('preflight: the offline-check items are not deterministic')
|
| 200 |
+
return dict(samples=n, state_dim=sd, body_dims=nb, images_changed=images_changed,
|
| 201 |
+
body_values_moved=round(moved, 4),
|
| 202 |
+
max_body_offset_deg=round(math.degrees(worst), 4), actions_bit_identical=True,
|
| 203 |
+
non_body_state_bit_identical=True, eval_items_deterministic=len(eval_picks))
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
def offline_eval(policy, dataset, samples, device, groups):
|
| 207 |
+
"""Normalized-action MSE of policy.predict on fixed dataset items (seeded), overall and per action group. FLASH:
|
| 208 |
+
its 30 Hz output rows against the recorded rows from the anchor (rows past the episode's end left out). A policy
|
| 209 |
+
with lead rows (ODE) starts from the recorded row before the frame (its BOS at an episode's first frame), as from
|
| 210 |
+
the executed row in closed loop, and is scored on the valid rows."""
|
| 211 |
+
import torch
|
| 212 |
+
policy.eval()
|
| 213 |
+
errs, masks = [], []
|
| 214 |
+
generator = torch.Generator(device=device)
|
| 215 |
+
generator.manual_seed(0)
|
| 216 |
+
lead = int(getattr(policy, 'lead_rows', 0))
|
| 217 |
+
for start in range(0, len(samples), 32):
|
| 218 |
+
batch = [dataset[int(k)] for k in samples[start:start + 32]]
|
| 219 |
+
images = torch.stack([b[0] for b in batch]).to(device).permute(0, 1, 4, 2, 3).float().div_(255.)
|
| 220 |
+
state = torch.stack([b[1] for b in batch]).to(device)
|
| 221 |
+
if policy.name == 'flash':
|
| 222 |
+
hist = torch.stack([b[3] for b in batch]).to(device)
|
| 223 |
+
has = torch.stack([b[4] for b in batch]).to(device)
|
| 224 |
+
target = torch.stack([b[5] for b in batch]).to(device)
|
| 225 |
+
valid = torch.stack([b[6] for b in batch]).numpy()
|
| 226 |
+
pred, _ = policy.predict(images, state, hist, has, generator=generator)
|
| 227 |
+
raw = policy.action_norm.normalize(pred.float())
|
| 228 |
+
elif lead:
|
| 229 |
+
rows = torch.stack([b[2] for b in batch]).to(device)
|
| 230 |
+
row_valid = torch.stack([b[3] for b in batch])
|
| 231 |
+
previous, target = rows[:, lead - 1], rows[:, lead:]
|
| 232 |
+
valid = (row_valid[:, lead:] > 0).numpy()
|
| 233 |
+
_, raw = policy.predict(images, state, generator=generator, previous=previous,
|
| 234 |
+
has_previous=(row_valid[:, lead - 1] > 0).to(device))
|
| 235 |
+
else:
|
| 236 |
+
target = torch.stack([b[2] for b in batch]).to(device)
|
| 237 |
+
valid = np.ones(target.shape[:2], bool)
|
| 238 |
+
_, raw = policy.predict(images, state, generator=generator)
|
| 239 |
+
errs.append((raw.float() - policy.action_norm.normalize(target)).pow(2).cpu().numpy())
|
| 240 |
+
masks.append(valid)
|
| 241 |
+
err, mask = np.concatenate(errs), np.concatenate(masks) # (S, horizon, action_dim), (S, horizon)
|
| 242 |
+
rows = err[mask]
|
| 243 |
+
out = dict(mse=float(rows.mean()), mse_row0=float(err[:, 0][mask[:, 0]].mean()))
|
| 244 |
+
offset = 0
|
| 245 |
+
for column, start, end in groups:
|
| 246 |
+
out[f'mse_{column.split(".")[-1]}'] = float(rows[:, offset:offset + end - start].mean())
|
| 247 |
+
offset += end - start
|
| 248 |
+
return out
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
def main():
|
| 252 |
+
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
| 253 |
+
p.add_argument('--policy', choices=sorted(POLICIES), required=True)
|
| 254 |
+
p.add_argument('--dataset', type=Path, required=True, help='LeRobot v2.1 dataset directory')
|
| 255 |
+
p.add_argument('--contract', choices=sorted(CONTRACTS), required=True)
|
| 256 |
+
p.add_argument('--cameras', help='comma-separated cameras (default: the contract\'s)')
|
| 257 |
+
p.add_argument('--episodes', help="episodes to use, e.g. '0:100' (default: all)")
|
| 258 |
+
p.add_argument('--val-episodes', type=int, default=0, help='hold out the last N of them for the offline check')
|
| 259 |
+
p.add_argument('--out', type=Path, required=True)
|
| 260 |
+
p.add_argument('--steps', type=int, default=60000)
|
| 261 |
+
p.add_argument('--batch-size', type=int, default=DEFAULTS['batch_size'])
|
| 262 |
+
p.add_argument('--lr', type=float, default=DEFAULTS['lr'])
|
| 263 |
+
p.add_argument('--weight-decay', type=float, default=DEFAULTS['weight_decay'])
|
| 264 |
+
p.add_argument('--warmup', type=int, default=DEFAULTS['warmup'])
|
| 265 |
+
p.add_argument('--ema', type=float, default=DEFAULTS['ema'], help='max EMA decay; 0 saves the raw weights')
|
| 266 |
+
p.add_argument('--horizon', type=int, default=None,
|
| 267 |
+
help="action rows per chunk (default: the policy's; 16; FLASH: --flash rows)")
|
| 268 |
+
p.add_argument('--image-size', default='168x224', help='HxW of the policy images')
|
| 269 |
+
p.add_argument('--augmentation', choices=['hb-v2', 'none'], default='hb-v2',
|
| 270 |
+
help='training augmentation: the benchmark spec v2 (default; docs/augmentation_v2.md) or none '
|
| 271 |
+
'(an explicit exception, recorded in run.json)')
|
| 272 |
+
p.add_argument('--shift', type=int, default=0,
|
| 273 |
+
help='native random-shift augmentation in pixels (default 0: off; only with --augmentation none)')
|
| 274 |
+
p.add_argument('--preflight-only', action='store_true', help='run the data preflight, write run.json and stop')
|
| 275 |
+
p.add_argument('--backbone-weights', default=None,
|
| 276 |
+
help="torchvision weights the ResNet18 starts from (default IMAGENET1K_V1; FLASH, ODE: none); "
|
| 277 |
+
"'none': from scratch")
|
| 278 |
+
p.add_argument('--backbone-lr-scale', type=float, default=None,
|
| 279 |
+
help='learning rate of the image backbone relative to --lr (default 0.1; FLASH, ODE: 1)')
|
| 280 |
+
p.add_argument('--model', action='append', default=[], metavar='KEY=VALUE',
|
| 281 |
+
help='override a PolicyConfig field (JSON value), e.g. num_layers=6; repeatable')
|
| 282 |
+
p.add_argument('--flash', action='append', default=[], metavar='KEY=VALUE',
|
| 283 |
+
help='FLASH setting (JSON value), e.g. stride=2; repeatable (flash.FLASH_DEFAULTS)')
|
| 284 |
+
p.add_argument('--cache-dir', type=Path, default=Path('~/hb_models/baselines/cache'))
|
| 285 |
+
p.add_argument('--workers', type=int, default=32,
|
| 286 |
+
help='DataLoader workers (and frame-cache decoders); the v2 augmentation costs ~17 ms of one CPU '
|
| 287 |
+
'core per item, so 8 workers feed only ~6 steps/s at batch 64')
|
| 288 |
+
p.add_argument('--prefetch', type=int, default=2, help='batches prefetched per worker')
|
| 289 |
+
p.add_argument('--save-every', type=int, default=10000)
|
| 290 |
+
p.add_argument('--log-every', type=int, default=100)
|
| 291 |
+
p.add_argument('--eval-samples', type=int, default=256)
|
| 292 |
+
p.add_argument('--seed', type=int, default=None,
|
| 293 |
+
help='training seed (default 0; FLASH, ODE: 42, their upstream recipes\')')
|
| 294 |
+
p.add_argument('--device', default='cuda:0')
|
| 295 |
+
p.add_argument('--no-amp', action='store_true')
|
| 296 |
+
p.add_argument('--resume', action='store_true', help='continue from <out>/train_state.pt')
|
| 297 |
+
p.add_argument('--inloop-task', help='in-training MSE: the task key of HumanWAM eval-action-mse hb_eval_common')
|
| 298 |
+
p.add_argument('--inloop-code', type=Path, help='in-training MSE: HumanWAM hb_training/eval-action-mse')
|
| 299 |
+
p.add_argument('--allow-no-inloop', action='store_true',
|
| 300 |
+
help='FLASH, ODE: train without the in-training MSE (an exception to the protocol, recorded)')
|
| 301 |
+
args = p.parse_args()
|
| 302 |
+
|
| 303 |
+
flash = args.policy == 'flash'
|
| 304 |
+
ode = args.policy in ODE_POLICIES
|
| 305 |
+
defaults = training_defaults(args.policy)
|
| 306 |
+
horizon = defaults['horizon'] if args.horizon is None else args.horizon
|
| 307 |
+
lead = POLICIES[args.policy].lead_rows
|
| 308 |
+
seed = defaults['seed'] if args.seed is None else args.seed
|
| 309 |
+
backbone_weights = defaults['backbone_weights'] if args.backbone_weights is None else args.backbone_weights
|
| 310 |
+
backbone_lr_scale = defaults['backbone_lr_scale'] if args.backbone_lr_scale is None else args.backbone_lr_scale
|
| 311 |
+
if (flash or ode) and not args.inloop_task and not args.allow_no_inloop:
|
| 312 |
+
raise SystemExit(f'{args.policy}: the protocol requires the in-training MSE (--inloop-task, --inloop-code), '
|
| 313 |
+
'or --allow-no-inloop as a recorded exception')
|
| 314 |
+
if bool(args.inloop_task) != bool(args.inloop_code):
|
| 315 |
+
raise SystemExit('--inloop-task and --inloop-code go together')
|
| 316 |
+
|
| 317 |
+
out = args.out.expanduser().resolve()
|
| 318 |
+
out.mkdir(parents=True, exist_ok=True)
|
| 319 |
+
contract = CONTRACTS[args.contract]
|
| 320 |
+
aug = augmentation_module()
|
| 321 |
+
aug.check_state_layout(contract.robot, contract.state_dim, [column for column, _, _ in contract.state])
|
| 322 |
+
hb_aug = args.augmentation == 'hb-v2'
|
| 323 |
+
if hb_aug and args.shift:
|
| 324 |
+
raise SystemExit('--shift is the native random shift, which the augmentation spec v2 turns off '
|
| 325 |
+
'(docs/augmentation_v2.md); use it only with --augmentation none')
|
| 326 |
+
if contract.body_dims != aug.BODY_JOINTS[contract.robot]:
|
| 327 |
+
raise SystemExit(f'contract {contract.name}: body_dims {contract.body_dims}, the spec perturbs '
|
| 328 |
+
f'{aug.BODY_JOINTS[contract.robot]} body joints')
|
| 329 |
+
augmentation = (aug.describe(contract.robot, contract.body_dims) if hb_aug else
|
| 330 |
+
dict(version=None, exception='--augmentation none (not the benchmark default)'))
|
| 331 |
+
cameras = tuple(args.cameras.split(',')) if args.cameras else contract.cameras
|
| 332 |
+
hw = parse_hw(args.image_size)
|
| 333 |
+
dataset = LeRobotDataset(args.dataset)
|
| 334 |
+
dataset.check_contract(contract, cameras)
|
| 335 |
+
episodes = parse_episodes(args.episodes, dataset.lengths)
|
| 336 |
+
if not 0 <= args.val_episodes < len(episodes):
|
| 337 |
+
raise SystemExit('--val-episodes must leave training episodes')
|
| 338 |
+
lowdim = load_lowdim(dataset, contract, episodes)
|
| 339 |
+
if len(lowdim['tasks']) != 1:
|
| 340 |
+
raise SystemExit(f"the baselines take no language: one task per dataset, found {lowdim['tasks']}")
|
| 341 |
+
n_train = len(episodes) - args.val_episodes
|
| 342 |
+
train_pos, val_pos = list(range(n_train)), list(range(n_train, len(episodes)))
|
| 343 |
+
train_rows = np.concatenate([np.arange(s, s + n) for s, n in
|
| 344 |
+
zip(lowdim['starts'][:n_train], lowdim['lengths'][:n_train])])
|
| 345 |
+
stats = statistics(lowdim, train_rows, quantiles=ode)
|
| 346 |
+
if ode: # the G1 port's normalization: the DFX6 values fixed at [0, 1]
|
| 347 |
+
for key, dims in unit_range_dims(contract).items():
|
| 348 |
+
stats[key]['unit_dims'] = dims
|
| 349 |
+
frames = frame_cache(dataset, lowdim, cameras, hw, args.cache_dir, workers=args.workers)
|
| 350 |
+
|
| 351 |
+
overrides = {k: json.loads(v) for k, v in (item.split('=', 1) for item in args.model)}
|
| 352 |
+
base = dict(policy=args.policy, n_cameras=len(cameras), state_dim=contract.state_dim,
|
| 353 |
+
action_dim=contract.action_dim, horizon=horizon)
|
| 354 |
+
if ode: # the body part integrated as the ODE state: the contract's first action group (G1 token 64, H2 body 31)
|
| 355 |
+
_, first, last = contract.action[0]
|
| 356 |
+
overrides.setdefault('ode_body_dim', last - first)
|
| 357 |
+
if flash:
|
| 358 |
+
settings = dict(FLASH_DEFAULTS, **{k: json.loads(v) for k, v in (i.split('=', 1) for i in args.flash)})
|
| 359 |
+
if args.horizon is not None and args.horizon != settings['rows']:
|
| 360 |
+
raise SystemExit('FLASH: the output rows are --flash rows=N, not --horizon')
|
| 361 |
+
base.update(FLASH_POLICY_FIELDS, horizon=int(settings['rows']), extra=dict(flash=settings))
|
| 362 |
+
elif args.flash:
|
| 363 |
+
raise SystemExit('--flash applies to --policy flash only')
|
| 364 |
+
weights = None if str(backbone_weights).lower() in ('none', '') else backbone_weights
|
| 365 |
+
pcfg = PolicyConfig.from_dict({**base, 'backbone_weights': weights, **overrides})
|
| 366 |
+
aug_seed = seed if hb_aug else None # every model: the seeded augmentation stream (REPRODUCIBILITY.md section 3)
|
| 367 |
+
if flash:
|
| 368 |
+
from baselines.flash import FlashPolicy, flash_settings
|
| 369 |
+
fs = flash_settings(pcfg)
|
| 370 |
+
H_ext = fs['poly_prefix'] + fs['n_action'] + fs['poly_suffix'] + 2 * fs['fit_pad']
|
| 371 |
+
offsets = (np.arange(H_ext) - (fs['fit_pad'] + fs['poly_prefix'])) * fs['stride']
|
| 372 |
+
kw = dict(offsets=offsets, stride=fs['stride'], n_history=fs['n_history'], rows=fs['rows'])
|
| 373 |
+
train_set = FlashChunkDataset(lowdim, frames, cameras, hw, train_pos,
|
| 374 |
+
body_dims=contract.body_dims if hb_aug else 0, aug_seed=aug_seed, **kw)
|
| 375 |
+
eval_set = FlashChunkDataset(lowdim, frames, cameras, hw, val_pos or train_pos, with_dense=True, **kw)
|
| 376 |
+
assert FlashPolicy.name == 'flash'
|
| 377 |
+
else:
|
| 378 |
+
train_set = ChunkDataset(lowdim, frames, cameras, hw, horizon, train_pos,
|
| 379 |
+
body_dims=contract.body_dims if hb_aug else 0, lead=lead, aug_seed=aug_seed)
|
| 380 |
+
eval_set = ChunkDataset(lowdim, frames, cameras, hw, horizon, val_pos or train_pos,
|
| 381 |
+
lead=lead) # never augmented
|
| 382 |
+
print(f'HB_AUG_SEED={aug_seed}', file=sys.stderr, flush=True)
|
| 383 |
+
checks = preflight(train_set, eval_set, contract, seed=seed)
|
| 384 |
+
print(json.dumps(dict(event='preflight', augmentation=augmentation.get('version'), **checks)), flush=True)
|
| 385 |
+
layout = dict(nodes=1, gpus=1, per_gpu_batch=args.batch_size, global_batch=args.batch_size,
|
| 386 |
+
gradient_accumulation=1, num_workers=args.workers, prefetch=args.prefetch)
|
| 387 |
+
if args.preflight_only:
|
| 388 |
+
(out / 'run.json').write_text(json.dumps(dict(
|
| 389 |
+
argv=sys.argv, started=datetime.now().isoformat(timespec='seconds'), host=os.uname().nodename,
|
| 390 |
+
contract=contract.to_dict(cameras), image_hw=list(hw), augmentation=augmentation, preflight=checks,
|
| 391 |
+
shift_px=args.shift, seed=seed, aug_seed=aug_seed, layout=layout, policy=pcfg.to_dict(),
|
| 392 |
+
code_commit=git_commit()), indent=1, default=str))
|
| 393 |
+
return
|
| 394 |
+
|
| 395 |
+
import torch
|
| 396 |
+
torch.manual_seed(seed)
|
| 397 |
+
np.random.seed(seed)
|
| 398 |
+
device = torch.device(args.device)
|
| 399 |
+
policy = build_policy(pcfg)
|
| 400 |
+
policy.fit_normalizers(stats)
|
| 401 |
+
policy.to(device)
|
| 402 |
+
ema = EMA(policy, args.ema, defaults.get('ema_schedule', 'hb')) if args.ema > 0 else None
|
| 403 |
+
named = list(policy.named_parameters())
|
| 404 |
+
backbone = [p for n, p in named if n.startswith(policy.backbone_prefix)]
|
| 405 |
+
rest = [p for n, p in named if not n.startswith(policy.backbone_prefix)]
|
| 406 |
+
if not backbone:
|
| 407 |
+
raise SystemExit(f'no backbone parameters under {policy.backbone_prefix!r}')
|
| 408 |
+
optimizer = torch.optim.AdamW([dict(params=rest), dict(params=backbone, lr=args.lr * backbone_lr_scale)],
|
| 409 |
+
lr=args.lr, betas=DEFAULTS['betas'], weight_decay=args.weight_decay)
|
| 410 |
+
schedule = defaults.get('schedule', 'hb')
|
| 411 |
+
|
| 412 |
+
def lr_lambda(step):
|
| 413 |
+
if schedule == 'diffusers_cosine': # diffusers get_cosine_schedule_with_warmup (FLASH's lr_scheduler)
|
| 414 |
+
if step < args.warmup:
|
| 415 |
+
return step / max(1, args.warmup)
|
| 416 |
+
progress = (step - args.warmup) / max(1, args.steps - args.warmup)
|
| 417 |
+
return max(0.0, 0.5 * (1.0 + math.cos(math.pi * progress)))
|
| 418 |
+
if step < args.warmup:
|
| 419 |
+
return (step + 1) / max(1, args.warmup)
|
| 420 |
+
return 0.5 * (1 + math.cos(math.pi * min(1.0, (step - args.warmup) / max(1, args.steps - args.warmup))))
|
| 421 |
+
|
| 422 |
+
scheduler = torch.optim.lr_scheduler.LambdaLR(optimizer, lr_lambda)
|
| 423 |
+
step = 0
|
| 424 |
+
state_path = out / 'train_state.pt'
|
| 425 |
+
if args.resume and state_path.exists():
|
| 426 |
+
saved = torch.load(state_path, map_location='cpu', weights_only=False)
|
| 427 |
+
if not same_policy_config(saved['config']['policy'], pcfg.to_dict()):
|
| 428 |
+
raise SystemExit('train_state.pt was written for another policy configuration')
|
| 429 |
+
before = saved['config'].get('training', {})
|
| 430 |
+
if (before.get('augmentation') or {}).get('version') != augmentation.get('version') \
|
| 431 |
+
or before.get('shift_px') != args.shift:
|
| 432 |
+
raise SystemExit('train_state.pt was trained with another augmentation (version / --shift); resuming '
|
| 433 |
+
'would change it mid-run')
|
| 434 |
+
policy.load_state_dict(saved['policy'])
|
| 435 |
+
optimizer.load_state_dict(saved['optimizer'])
|
| 436 |
+
scheduler.load_state_dict(saved['scheduler'])
|
| 437 |
+
if ema is not None:
|
| 438 |
+
ema.model.load_state_dict(saved['ema'])
|
| 439 |
+
step = int(saved['step'])
|
| 440 |
+
print(json.dumps(dict(event='resumed', step=step)), flush=True)
|
| 441 |
+
|
| 442 |
+
inloop = None
|
| 443 |
+
if args.inloop_task:
|
| 444 |
+
from baselines import inloop as inloop_mod
|
| 445 |
+
inloop = inloop_mod.install(args.inloop_code, args.inloop_task, out,
|
| 446 |
+
lambda: ema.model if ema is not None else policy, contract, cameras, hw, lowdim,
|
| 447 |
+
args.policy, lowdim_loader=lambda eps: load_lowdim(dataset, contract, eps))
|
| 448 |
+
else:
|
| 449 |
+
print(f'HB_INLOOP {args.policy} disabled: no --inloop-task', flush=True)
|
| 450 |
+
|
| 451 |
+
samples = np.random.default_rng(1).choice(len(eval_set), size=min(args.eval_samples, len(eval_set)), replace=False)
|
| 452 |
+
training = dict(steps=args.steps, batch_size=args.batch_size, lr=args.lr, betas=list(DEFAULTS['betas']),
|
| 453 |
+
weight_decay=args.weight_decay, warmup=args.warmup,
|
| 454 |
+
schedule='linear warm-up + cosine' if schedule == 'hb' else schedule,
|
| 455 |
+
backbone_lr_scale=backbone_lr_scale,
|
| 456 |
+
ema=args.ema, shift_px=args.shift, amp=(not args.no_amp) and bool(defaults['amp']), seed=seed,
|
| 457 |
+
augmentation=augmentation, preflight=checks, aug_seed=aug_seed, layout=layout)
|
| 458 |
+
training.update(ema_schedule=defaults.get('ema_schedule', 'hb'),
|
| 459 |
+
inloop=dict(task=args.inloop_task, code=str(args.inloop_code) if args.inloop_code else None,
|
| 460 |
+
every=int(os.environ.get('HB_INLOOP_EVERY', '250')) if args.inloop_task else 0,
|
| 461 |
+
exception=None if args.inloop_task or not (flash or ode) else '--allow-no-inloop'))
|
| 462 |
+
if flash:
|
| 463 |
+
training.update(upstream='NTUMARS/FLASH-Policy@f47e490')
|
| 464 |
+
if ode:
|
| 465 |
+
training.update(upstream='NTUMARS/ODE-POLICY real-g1@fd8bec47 (G1 port, HumanWAM packages/ode_g1) + '
|
| 466 |
+
'main@cea26d94 (encoder, ode_dit field, default_train.yaml)')
|
| 467 |
+
config = dict(
|
| 468 |
+
policy=pcfg.to_dict(), contract=contract.to_dict(cameras), image_hw=list(hw), task_text=lowdim['tasks'][0],
|
| 469 |
+
dataset=dict(name=dataset.name,
|
| 470 |
+
root=str(dataset.root), robot_type=dataset.info.get('robot_type'), fps=dataset.fps,
|
| 471 |
+
episodes=episodes, train_episodes=episodes[:n_train], val_episodes=episodes[n_train:],
|
| 472 |
+
train_frames=int(len(train_set)),
|
| 473 |
+
git_commit=dataset.info.get('script_config', {}).get('git_commit')),
|
| 474 |
+
training=training, stats=stats, code_commit=git_commit())
|
| 475 |
+
run = dict(argv=sys.argv, started=datetime.now().isoformat(timespec='seconds'), host=os.uname().nodename,
|
| 476 |
+
torch=torch.__version__, **config)
|
| 477 |
+
(out / 'run.json').write_text(json.dumps(run, indent=1, default=str))
|
| 478 |
+
loader = torch.utils.data.DataLoader(train_set, batch_size=args.batch_size, shuffle=True, drop_last=True,
|
| 479 |
+
num_workers=args.workers, pin_memory=True, persistent_workers=True,
|
| 480 |
+
prefetch_factor=args.prefetch)
|
| 481 |
+
params = sum(x.numel() for x in policy.parameters())
|
| 482 |
+
print(json.dumps(dict(event='start', policy=args.policy, params=params,
|
| 483 |
+
backbone_params=sum(x.numel() for x in backbone), backbone_weights=pcfg.backbone_weights,
|
| 484 |
+
backbone_norm=pcfg.backbone_norm, train_frames=len(train_set), steps=args.steps,
|
| 485 |
+
from_step=step, cameras=list(cameras), hw=list(hw), seed=seed)), flush=True)
|
| 486 |
+
log = (out / 'train_log.jsonl').open('a')
|
| 487 |
+
amp = (not args.no_amp) and device.type == 'cuda' and bool(defaults['amp'])
|
| 488 |
+
|
| 489 |
+
def save(step):
|
| 490 |
+
folder = out / f'checkpoints/step-{step:06d}'
|
| 491 |
+
model = ema.model if ema is not None else policy
|
| 492 |
+
metrics = offline_eval(model, eval_set, samples, device, contract.action)
|
| 493 |
+
save_checkpoint(folder, model, dict(config, step=step, weights='ema' if ema is not None else 'raw',
|
| 494 |
+
offline_eval=dict(metrics, samples=len(samples),
|
| 495 |
+
frames='val' if val_pos else 'train')))
|
| 496 |
+
final = out / 'checkpoints/final'
|
| 497 |
+
if final.is_symlink() or final.exists():
|
| 498 |
+
final.unlink()
|
| 499 |
+
final.symlink_to(folder.name)
|
| 500 |
+
torch.save(dict(policy=policy.state_dict(), optimizer=optimizer.state_dict(), scheduler=scheduler.state_dict(),
|
| 501 |
+
ema=None if ema is None else ema.model.state_dict(), step=step, config=config),
|
| 502 |
+
out / 'train_state.pt.tmp')
|
| 503 |
+
(out / 'train_state.pt.tmp').replace(state_path)
|
| 504 |
+
record = dict(event='save', step=step, checkpoint=str(folder), **metrics)
|
| 505 |
+
print(json.dumps(record), flush=True)
|
| 506 |
+
log.write(json.dumps(record) + '\n')
|
| 507 |
+
log.flush()
|
| 508 |
+
policy.train()
|
| 509 |
+
|
| 510 |
+
policy.train()
|
| 511 |
+
t0, data_s, acc = time.monotonic(), 0.0, {}
|
| 512 |
+
while step < args.steps:
|
| 513 |
+
tick = time.monotonic()
|
| 514 |
+
for images, *labels in loader:
|
| 515 |
+
data_s += time.monotonic() - tick
|
| 516 |
+
images = images.to(device, non_blocking=True).permute(0, 1, 4, 2, 3).float().div_(255.)
|
| 517 |
+
images = random_shift(images, args.shift)
|
| 518 |
+
labels = [x.to(device, non_blocking=True) for x in labels]
|
| 519 |
+
with torch.autocast(device.type, dtype=torch.bfloat16, enabled=amp):
|
| 520 |
+
loss, metrics = policy.compute_loss(images, *labels)
|
| 521 |
+
optimizer.zero_grad(set_to_none=True)
|
| 522 |
+
loss.backward()
|
| 523 |
+
optimizer.step()
|
| 524 |
+
scheduler.step()
|
| 525 |
+
step += 1
|
| 526 |
+
decay = ema.update(policy, step) if ema is not None else 0.0
|
| 527 |
+
for k, v in dict(metrics, loss=float(loss.detach())).items():
|
| 528 |
+
acc[k] = acc.get(k, 0.0) + v
|
| 529 |
+
if step % args.log_every == 0:
|
| 530 |
+
elapsed = time.monotonic() - t0
|
| 531 |
+
record = dict(event='train', step=step, lr=scheduler.get_last_lr()[0],
|
| 532 |
+
backbone_lr=scheduler.get_last_lr()[1], ema_decay=round(decay, 6),
|
| 533 |
+
it_s=round(args.log_every / elapsed, 2), data_frac=round(data_s / elapsed, 3),
|
| 534 |
+
**{k: v / args.log_every for k, v in acc.items()})
|
| 535 |
+
print(json.dumps(record), flush=True)
|
| 536 |
+
log.write(json.dumps(record) + '\n')
|
| 537 |
+
log.flush()
|
| 538 |
+
t0, data_s, acc = time.monotonic(), 0.0, {}
|
| 539 |
+
if inloop is not None and step % inloop.every == 0:
|
| 540 |
+
inloop.evaluate(step, ema.model if ema is not None else policy)
|
| 541 |
+
policy.train()
|
| 542 |
+
if step % args.save_every == 0 or step == args.steps:
|
| 543 |
+
save(step)
|
| 544 |
+
if step >= args.steps:
|
| 545 |
+
break
|
| 546 |
+
tick = time.monotonic()
|
| 547 |
+
log.close()
|
| 548 |
+
print(json.dumps(dict(event='done', step=step, checkpoint=str(out / 'checkpoints/final'))), flush=True)
|
| 549 |
+
|
| 550 |
+
|
| 551 |
+
if __name__ == '__main__':
|
| 552 |
+
main()
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_2c91a514/evaluation/policy/ACT/model.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""ACT (action chunking with transformers) baseline of the Humanoid Benchmark (evaluation/baselines, ported from
|
| 2 |
+
DextraVerse's IL core): one checkpoint of evaluation/baselines/train.py with the g1_sonic_dfx6 contract, served by
|
| 3 |
+
the shared adapter evaluation/baselines/adapters.py (current ego_view + chest frames and state44 -> 16 rows of
|
| 4 |
+
action76).
|
| 5 |
+
"""
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
import sys
|
| 8 |
+
|
| 9 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2])) # evaluation/: the baselines package
|
| 10 |
+
from baselines.adapters import make_model # noqa: E402
|
| 11 |
+
|
| 12 |
+
Model = make_model('act')
|
a21-floor-basket-transfer/b512/step-004000/training_records/code_commit.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
2c91a514d65897635ae769a3e00d318a9be385cb
|
a21-floor-basket-transfer/b512/step-004000/training_records/inloop-mse.jsonl
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"step": 250, "utc": "2026-11-25T20:36:02Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 8.8, "infer_s_per_query": 0.0065, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0032674349632736657, "mae_raw": 0.037903343320297, "nmse": 0.12243089749438703, "groups": {"motion_token": {"mse_raw": 0.0030431011617464898, "nmse": 0.13459531119346335}, "hands": {"mse_raw": 0.004463881904751935, "nmse": 0.05755402443264688}}, "nmse_by_step": [0.11700719447236493, 0.11585653274061532, 0.11510418130537907, 0.11396472466948988, 0.11337926899420186, 0.11131854385125935, 0.11281217520830347, 0.11567590069463889, 0.11728938143987772, 0.11876317707099045, 0.12296555794759237, 0.12764757719077488, 0.131713401607571, 0.13637229527214884, 0.14223995285040947, 0.14756918491136914], "nmse_per_episode": {"0": 0.10650572518693345, "11": 0.11776226001049335, "22": 0.1953815526160414, "33": 0.09795935443021052, "44": 0.09981023706797154, "55": 0.15349629447195703, "66": 0.12346169717207434, "77": 0.1300801630502764, "88": 0.09662002283180698, "99": 0.0914956693206479}, "nmse_episode_sem": 0.010188122167438824}
|
| 2 |
+
{"step": 500, "utc": "2026-11-25T20:37:47Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.1, "infer_s_per_query": 0.0039, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.002039707920719383, "mae_raw": 0.02941318143139731, "nmse": 0.07847638200336758, "groups": {"motion_token": {"mse_raw": 0.0019051398957975556, "nmse": 0.08552072517213785}, "hands": {"mse_raw": 0.002757404053635795, "nmse": 0.04090655176992613}}, "nmse_by_step": [0.07952674083892983, 0.07514237722764966, 0.07163670615546114, 0.06811088874244764, 0.06567496859395107, 0.06241310407346195, 0.06308203971394606, 0.06574722582680334, 0.06823467012565729, 0.07083256707863379, 0.07707137794093107, 0.08346839387740461, 0.08988427650393531, 0.09676392111381091, 0.10505076314679439, 0.11393121767758611], "nmse_per_episode": {"0": 0.07037325889759756, "11": 0.07533801771453612, "22": 0.09868280241372351, "33": 0.0677006965393162, "44": 0.06794706771490643, "55": 0.10129158962253783, "66": 0.08067671201207324, "77": 0.0921215115495328, "88": 0.06512243555546424, "99": 0.06114248327661523}, "nmse_episode_sem": 0.004593764585718266}
|
| 3 |
+
{"step": 750, "utc": "2026-11-25T20:39:52Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0047, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0016313857608127515, "mae_raw": 0.026218722507963525, "nmse": 0.06544548432405191, "groups": {"motion_token": {"mse_raw": 0.0015482882308643338, "nmse": 0.07137779946841592}, "hands": {"mse_raw": 0.0020745725872043136, "nmse": 0.03380647022077722}}, "nmse_by_step": [0.06814271354801915, 0.06343991929757622, 0.05954173973625574, 0.05566974635323715, 0.053123205066756767, 0.049788252833638136, 0.05001227311381748, 0.05239410446302859, 0.05480208762661067, 0.05748614285158199, 0.06369019948773254, 0.07000230094659661, 0.07623441070505556, 0.08299696859507577, 0.09102441716190014, 0.09966873689019667], "nmse_per_episode": {"0": 0.05993806957951004, "11": 0.06086974748469333, "22": 0.0771963690989635, "33": 0.05747008392434411, "44": 0.05797471375204711, "55": 0.08202893844185287, "66": 0.06927025441857179, "77": 0.08024237101083002, "88": 0.054768821293469876, "99": 0.05187706988617431}, "nmse_episode_sem": 0.003519245560174879}
|
| 4 |
+
{"step": 1000, "utc": "2026-11-25T20:41:41Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.2, "infer_s_per_query": 0.0041, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.001321392351713581, "mae_raw": 0.02369045821583229, "nmse": 0.05355979924802843, "groups": {"motion_token": {"mse_raw": 0.0012522889863127464, "nmse": 0.058112335020370436}, "hands": {"mse_raw": 0.0016899436338513663, "nmse": 0.029279608462204315}}, "nmse_by_step": [0.054487263672047245, 0.05103796708002851, 0.04853460937446271, 0.04561924387521509, 0.04421563348090628, 0.04179779244989743, 0.04192759696077075, 0.04423583849883109, 0.04630951257058222, 0.048198797276718996, 0.053019219839509205, 0.05782504625303458, 0.062206763697615984, 0.06672679825695642, 0.07268119770167583, 0.07882396203066704], "nmse_per_episode": {"0": 0.04901894764277873, "11": 0.0482689844497632, "22": 0.06179731507810603, "33": 0.04723675508851739, "44": 0.04696568588186398, "55": 0.0670751608467478, "66": 0.05855793839384889, "77": 0.06744001517846367, "88": 0.044697983803265215, "99": 0.04239383794151359}, "nmse_episode_sem": 0.0029869883250629747}
|
| 5 |
+
{"step": 1250, "utc": "2026-11-25T20:43:47Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.8, "infer_s_per_query": 0.0051, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.001114493345281855, "mae_raw": 0.021803585930643018, "nmse": 0.044615279868747096, "groups": {"motion_token": {"mse_raw": 0.001037338750943885, "nmse": 0.047873023986746865}, "hands": {"mse_raw": 0.0015259845150843623, "nmse": 0.027240644572748315}}, "nmse_by_step": [0.04199214751675088, 0.040274223649685296, 0.03967276676516898, 0.03803467596483984, 0.03771143617887409, 0.03614299550277034, 0.03623491505436083, 0.03852287977077763, 0.04041956603216367, 0.041721496026092535, 0.04537759239582667, 0.04903069235506972, 0.05194972768630334, 0.0548863619714278, 0.05920003536687895, 0.06324860826184049], "nmse_per_episode": {"0": 0.03900366886193856, "11": 0.04051890716052217, "22": 0.0504640314710339, "33": 0.039655314262417786, "44": 0.03791559048576012, "55": 0.055834080255445534, "66": 0.049428114344658464, "77": 0.058144155267669785, "88": 0.03785694847230164, "99": 0.03573202437039501}, "nmse_episode_sem": 0.0025998975404866835}
|
| 6 |
+
{"step": 1500, "utc": "2026-11-25T20:45:35Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.2, "infer_s_per_query": 0.0041, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0010125267946245668, "mae_raw": 0.02066260750459063, "nmse": 0.04006576341148489, "groups": {"motion_token": {"mse_raw": 0.0009260315512061508, "nmse": 0.04260015833797916}, "hands": {"mse_raw": 0.0014738347595227843, "nmse": 0.026548990470182162}}, "nmse_by_step": [0.036103969312319656, 0.035041484494247134, 0.03521813553863015, 0.034094208808337516, 0.03416687187698314, 0.03282144711766721, 0.03289788364958542, 0.03511376581585858, 0.036889032305802004, 0.03799324310895947, 0.04120618906944539, 0.044402008118140504, 0.04693139649883422, 0.04936710277631405, 0.05304582440295805, 0.056292745083771044], "nmse_per_episode": {"0": 0.03395735239148604, "11": 0.03732944080045587, "22": 0.04453206987480562, "33": 0.03617019099510204, "44": 0.03422923836277071, "55": 0.04907905511334307, "66": 0.04366041539746101, "77": 0.05320331304053643, "88": 0.03488631726978348, "99": 0.03241883540393443}, "nmse_episode_sem": 0.0022752409767094143}
|
| 7 |
+
{"step": 1750, "utc": "2026-11-25T20:47:38Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0048, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0009459938041692417, "mae_raw": 0.019842339232749976, "nmse": 0.0371547173080086, "groups": {"motion_token": {"mse_raw": 0.0008525929248001821, "nmse": 0.03923013790739355}, "hands": {"mse_raw": 0.0014441318274708917, "nmse": 0.026085807444622175}}, "nmse_by_step": [0.033003808744761144, 0.03214475844645017, 0.032647140166957335, 0.031657616415295055, 0.03189982388686363, 0.030598726183700714, 0.030639921360198896, 0.03277029186448563, 0.0344128722545881, 0.035400896722888056, 0.03829277046575182, 0.04121396001363506, 0.04351405144716086, 0.04566786616148035, 0.04904996347355177, 0.0520565715674113], "nmse_per_episode": {"0": 0.0316447314705937, "11": 0.03523093301889458, "22": 0.04099749772538799, "33": 0.03376323526149785, "44": 0.03212088302458796, "55": 0.04393490053138527, "66": 0.039750174741587846, "77": 0.05002322938205076, "88": 0.03305244619605538, "99": 0.03012194430852644}, "nmse_episode_sem": 0.0020280850293777604}
|
| 8 |
+
{"step": 2000, "utc": "2026-11-25T20:49:29Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.2, "infer_s_per_query": 0.0041, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.000900863661217097, "mae_raw": 0.01924874365660412, "nmse": 0.03528457271891942, "groups": {"motion_token": {"mse_raw": 0.0008038395667302992, "nmse": 0.03708023523904014}, "hands": {"mse_raw": 0.0014183254984800186, "nmse": 0.025707705944942285}}, "nmse_by_step": [0.0311757087271153, 0.03039825577567256, 0.0310365898459184, 0.030072505623445486, 0.03038067931789158, 0.029143270694521523, 0.02918591521919694, 0.03125208284530415, 0.03277712378328575, 0.03368715874955283, 0.036339164663155406, 0.03912858192038878, 0.041247750102074356, 0.04325596460040768, 0.046530801606241894, 0.049411666088294455], "nmse_per_episode": {"0": 0.030508034591439734, "11": 0.03370992345122883, "22": 0.03869745073906673, "33": 0.03238091811933518, "44": 0.030808772778965276, "55": 0.04012409434951312, "66": 0.03754303406715602, "77": 0.047757825251098646, "88": 0.03189439896215809, "99": 0.02872011329398578}, "nmse_episode_sem": 0.001838013593251148}
|
| 9 |
+
{"step": 2250, "utc": "2026-11-25T20:51:45Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0047, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0008635394851708826, "mae_raw": 0.018757456161557832, "nmse": 0.03378101905940381, "groups": {"motion_token": {"mse_raw": 0.0007643143326660615, "nmse": 0.035360952049997015}, "hands": {"mse_raw": 0.0013927402985299286, "nmse": 0.025354709776240117}}, "nmse_by_step": [0.029994796569401422, 0.029213046748602752, 0.029889891072942522, 0.028914937726698006, 0.02920884867223308, 0.027996796729328175, 0.02800496395755667, 0.030004041459396596, 0.031422734226039854, 0.032285605738470544, 0.0347560772786058, 0.03738460960314445, 0.039299193478773045, 0.04114748175931254, 0.04430129928838139, 0.04711154103249267], "nmse_per_episode": {"0": 0.0294554898582232, "11": 0.03244264531740066, "22": 0.037010868387468907, "33": 0.0313614928145599, "44": 0.029617136529413356, "55": 0.03696820616788772, "66": 0.03638510615405729, "77": 0.045465420537037185, "88": 0.031062540552077973, "99": 0.02748169582108203}, "nmse_episode_sem": 0.001682030362660039}
|
| 10 |
+
{"step": 2500, "utc": "2026-11-25T20:53:36Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.2, "infer_s_per_query": 0.0041, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0008324779131786606, "mae_raw": 0.018365620042113985, "nmse": 0.032564771504079916, "groups": {"motion_token": {"mse_raw": 0.00073250722342796, "nmse": 0.0339916185687833}, "hands": {"mse_raw": 0.0013656549251823968, "nmse": 0.024954920492328524}}, "nmse_by_step": [0.029173721134756792, 0.0283589589880507, 0.029039659893039103, 0.02799846746776655, 0.028267927336631943, 0.027056033962315262, 0.027021194713329234, 0.02897693205207822, 0.030275792053732167, 0.031100529020848672, 0.03345393133479741, 0.03592542348771297, 0.0376855173574287, 0.03944396966772084, 0.042464951166790534, 0.04520509914126562], "nmse_per_episode": {"0": 0.028740758512834017, "11": 0.031351040515440465, "22": 0.03554996907647644, "33": 0.030792198552252105, "44": 0.028642668535368253, "55": 0.03501932262705859, "66": 0.03532500265733456, "77": 0.04267704753192718, "88": 0.0304671587027488, "99": 0.026585844837256727}, "nmse_episode_sem": 0.0014890609464308941}
|
| 11 |
+
{"step": 2750, "utc": "2026-11-25T20:55:38Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.7, "infer_s_per_query": 0.0049, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0007985939211382045, "mae_raw": 0.01801175382674027, "nmse": 0.031371444850592865, "groups": {"motion_token": {"mse_raw": 0.0007037690482691196, "nmse": 0.03271945145088988}, "hands": {"mse_raw": 0.00130432657643999, "nmse": 0.024182076315675472}}, "nmse_by_step": [0.02853382189028059, 0.027698277866839212, 0.02837861823746586, 0.027296760669247175, 0.027518629970897934, 0.026303966912830976, 0.026194037994728716, 0.028023425161421072, 0.029153372559404447, 0.02993644230564808, 0.032139967686697225, 0.03431031846050053, 0.03589737904525461, 0.037561159732992275, 0.04035952205799048, 0.043008056215402594], "nmse_per_episode": {"0": 0.028112352749082234, "11": 0.03029201291872769, "22": 0.03446120982956629, "33": 0.03015813504445522, "44": 0.027325034836667605, "55": 0.033691278396142145, "66": 0.0346323077691365, "77": 0.03902571951022483, "88": 0.02958723043289324, "99": 0.025873539029983485}, "nmse_episode_sem": 0.0012787204950673807}
|
| 12 |
+
{"step": 3000, "utc": "2026-11-25T20:57:26Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0047, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0007691301470530828, "mae_raw": 0.01773149437509983, "nmse": 0.030438303713674293, "groups": {"motion_token": {"mse_raw": 0.0006827114006368068, "nmse": 0.03178337082579306}, "hands": {"mse_raw": 0.001230030127939888, "nmse": 0.02326461244904088}}, "nmse_by_step": [0.02785130258005598, 0.027024686756569532, 0.02773762063646783, 0.0267535838847887, 0.02695956770274024, 0.025757514428145962, 0.025600190508368505, 0.027333518763823582, 0.028322146918662236, 0.029130456539911694, 0.03126837776017037, 0.03309667305639746, 0.03452830590071227, 0.03607182015665159, 0.03868902708778621, 0.04122897541561545], "nmse_per_episode": {"0": 0.027465536298712293, "11": 0.029117162846679, "22": 0.03374472031128156, "33": 0.029683671257477198, "44": 0.026684844889907595, "55": 0.032746400144305514, "66": 0.03394929312059688, "77": 0.036628463484329944, "88": 0.028419777467099783, "99": 0.02531356726485634}, "nmse_episode_sem": 0.001166396346239246}
|
| 13 |
+
{"step": 3250, "utc": "2026-11-25T20:59:30Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0047, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0007483844677949564, "mae_raw": 0.017518782648405624, "nmse": 0.02977926296061336, "groups": {"motion_token": {"mse_raw": 0.0006676349686910721, "nmse": 0.03112212564244155}, "hands": {"mse_raw": 0.0011790484630156725, "nmse": 0.022617328657529658}}, "nmse_by_step": [0.02728336078828078, 0.026443975750749398, 0.027151865286811246, 0.026306491606601912, 0.02653534270802156, 0.025354899977508002, 0.02516212582032958, 0.026839603890180568, 0.027730393276318776, 0.028622614738974234, 0.03065208693572961, 0.032298764307047076, 0.03359389995972212, 0.03508462713618842, 0.0376405203092956, 0.04009308593473839], "nmse_per_episode": {"0": 0.026826635082654007, "11": 0.02830167277131495, "22": 0.033150560365197916, "33": 0.02922875623384643, "44": 0.026359100254767173, "55": 0.03204345570938474, "66": 0.033332195331339326, "77": 0.035238819328622516, "88": 0.027771254557547545, "99": 0.024896913705063743}, "nmse_episode_sem": 0.0011037924863098146}
|
| 14 |
+
{"step": 3500, "utc": "2026-11-25T21:01:19Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0048, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0007320485722827021, "mae_raw": 0.01737522107064606, "nmse": 0.029327202117661447, "groups": {"motion_token": {"mse_raw": 0.0006581322316893173, "nmse": 0.03071184159440742}, "hands": {"mse_raw": 0.0011262690554474208, "nmse": 0.021942458241682915}}, "nmse_by_step": [0.026773968953739857, 0.025922685868138222, 0.02660506992940861, 0.0259734149277091, 0.026245749307247723, 0.025087625340272944, 0.024883256345558796, 0.026540281227066087, 0.02741847689511897, 0.02827363622412631, 0.030245576637510235, 0.031769574683762423, 0.03301621893356701, 0.03446685982974786, 0.03696077231500716, 0.039370838919446156], "nmse_per_episode": {"0": 0.02605973932741059, "11": 0.02788101652706462, "22": 0.032707679599141684, "33": 0.0288725064896788, "44": 0.026255736493213336, "55": 0.031574011426387424, "66": 0.03293018991388156, "77": 0.03436305028541406, "88": 0.02742754471371742, "99": 0.024567942698598657}, "nmse_episode_sem": 0.0010720940706613143}
|
| 15 |
+
{"step": 3750, "utc": "2026-11-25T21:03:20Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.7, "infer_s_per_query": 0.0049, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.000721046103583392, "mae_raw": 0.01728616397691611, "nmse": 0.02903933882566793, "groups": {"motion_token": {"mse_raw": 0.0006520801646339295, "nmse": 0.030459497144851484}, "hands": {"mse_raw": 0.001088864444647192, "nmse": 0.02146516112335562}}, "nmse_by_step": [0.026501355899967226, 0.025650936952630415, 0.026339412774583043, 0.02582297660583868, 0.026074122590399637, 0.024940111912639104, 0.02473513904990136, 0.02651193174586448, 0.027276146967999338, 0.028068698711288236, 0.029972803731369638, 0.03138527499758518, 0.0326121436165854, 0.033951880068949954, 0.03636089858615682, 0.038734182784452675], "nmse_per_episode": {"0": 0.025857299661769886, "11": 0.02750887918325105, "22": 0.032425565014726994, "33": 0.02843813451181784, "44": 0.026254838888962226, "55": 0.03128749496797136, "66": 0.03279191006841234, "77": 0.03380964626493277, "88": 0.02728468774043406, "99": 0.024111922192444794}, "nmse_episode_sem": 0.0010607143573748612}
|
| 16 |
+
{"step": 4000, "utc": "2026-11-25T21:05:14Z", "model": "act", "task": "a21", "split": "train10", "queries": 539, "ranks": 1, "wall_s": 2.6, "infer_s_per_query": 0.0048, "seed": 1234, "weights": "ema", "policy": "act", "cache_checked_episodes": [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], "inloop_code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse", "cache": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse/cache/a21/train10", "rows": 8565, "metric": "nmse-v2: dims constant over training excluded", "dims_scored": 76, "mse_raw": 0.0007122525515479979, "mae_raw": 0.01722415229444041, "nmse": 0.028825183471613336, "groups": {"motion_token": {"mse_raw": 0.0006481042274058847, "nmse": 0.030286302974129722}, "hands": {"mse_raw": 0.0010543769469726013, "nmse": 0.021032546124859268}}, "nmse_by_step": [0.02629861294516137, 0.02545639098089242, 0.02615400639401502, 0.02570139491923428, 0.02595364783928242, 0.02483488510451557, 0.024639156988775657, 0.02649015621599358, 0.027134896407657316, 0.027914395434004383, 0.0297640539465998, 0.03112666588253585, 0.03231422647216803, 0.03355048761780721, 0.03589685878205198, 0.03827388810460066], "nmse_per_episode": {"0": 0.02571414902386811, "11": 0.027252051706658644, "22": 0.032260273607419614, "33": 0.028048784793247312, "44": 0.026160597466814293, "55": 0.031119833598531786, "66": 0.032622923919859034, "77": 0.03351420096365509, "88": 0.027169670277322238, "99": 0.0237668067879009}, "nmse_episode_sem": 0.0010625975304478406}
|
a21-floor-basket-transfer/b512/step-004000/training_records/pip_freeze_hb-baselines.txt
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
anyio==4.16.0
|
| 2 |
+
av==15.1.0
|
| 3 |
+
certifi==2026.11.20
|
| 4 |
+
charset-normalizer==3.5.3
|
| 5 |
+
click==8.5.1
|
| 6 |
+
diffusers==0.35.1
|
| 7 |
+
filelock==4.3.1
|
| 8 |
+
fsspec==2026.9.0
|
| 9 |
+
h11==0.16.0
|
| 10 |
+
hf-xet==1.8.0
|
| 11 |
+
httpcore2==2.16.2
|
| 12 |
+
httpx2==2.16.2
|
| 13 |
+
huggingface_hub==2.4.0
|
| 14 |
+
idna==3.20
|
| 15 |
+
importlib_metadata==10.2.0
|
| 16 |
+
iniconfig==2.3.1
|
| 17 |
+
Jinja2==3.1.6
|
| 18 |
+
lazy-importer==0.1.0
|
| 19 |
+
MarkupSafe==3.0.4
|
| 20 |
+
mpmath==1.3.0
|
| 21 |
+
networkx==3.7
|
| 22 |
+
numpy==2.2.6
|
| 23 |
+
nvidia-cublas-cu12==12.8.4.1
|
| 24 |
+
nvidia-cuda-cupti-cu12==12.8.90
|
| 25 |
+
nvidia-cuda-nvrtc-cu12==12.8.93
|
| 26 |
+
nvidia-cuda-runtime-cu12==12.8.90
|
| 27 |
+
nvidia-cudnn-cu12==9.10.2.21
|
| 28 |
+
nvidia-cufft-cu12==11.3.3.83
|
| 29 |
+
nvidia-cufile-cu12==1.13.1.3
|
| 30 |
+
nvidia-curand-cu12==10.3.9.90
|
| 31 |
+
nvidia-cusolver-cu12==11.7.3.90
|
| 32 |
+
nvidia-cusparse-cu12==12.5.8.93
|
| 33 |
+
nvidia-cusparselt-cu12==0.7.1
|
| 34 |
+
nvidia-nccl-cu12==2.27.5
|
| 35 |
+
nvidia-nvjitlink-cu12==12.8.93
|
| 36 |
+
nvidia-nvshmem-cu12==3.3.20
|
| 37 |
+
nvidia-nvtx-cu12==12.8.90
|
| 38 |
+
opencv-python-headless==4.11.0.86
|
| 39 |
+
packaging==26.4
|
| 40 |
+
pillow==13.0.0
|
| 41 |
+
pluggy==1.7.0
|
| 42 |
+
pyarrow==23.0.1
|
| 43 |
+
Pygments==2.21.0
|
| 44 |
+
pytest==8.4.2
|
| 45 |
+
PyYAML==6.0.4
|
| 46 |
+
regex==2026.11.19
|
| 47 |
+
requests==2.34.2
|
| 48 |
+
safetensors==0.8.0
|
| 49 |
+
setuptools==84.2.1
|
| 50 |
+
sympy==1.14.0
|
| 51 |
+
torch==2.9.0+cu128
|
| 52 |
+
torchvision==0.24.0+cu128
|
| 53 |
+
tqdm==4.70.1
|
| 54 |
+
triton==3.5.0
|
| 55 |
+
truststore==0.10.5
|
| 56 |
+
typing_extensions==4.16.0
|
| 57 |
+
urllib3==2.8.0
|
| 58 |
+
zipp==4.1.2
|
a21-floor-basket-transfer/b512/step-004000/training_records/run.json
ADDED
|
@@ -0,0 +1,934 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"argv": [
|
| 3 |
+
"evaluation/baselines/train.py",
|
| 4 |
+
"--policy",
|
| 5 |
+
"act",
|
| 6 |
+
"--contract",
|
| 7 |
+
"g1_sonic_dfx6",
|
| 8 |
+
"--dataset",
|
| 9 |
+
"/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a21-floor-transfer-basket-682f2bf/data",
|
| 10 |
+
"--episodes",
|
| 11 |
+
"0:100",
|
| 12 |
+
"--out",
|
| 13 |
+
"/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/act-runs/a21-b512-s4000",
|
| 14 |
+
"--steps",
|
| 15 |
+
"4000",
|
| 16 |
+
"--batch-size",
|
| 17 |
+
"512",
|
| 18 |
+
"--warmup",
|
| 19 |
+
"200",
|
| 20 |
+
"--seed",
|
| 21 |
+
"0",
|
| 22 |
+
"--workers",
|
| 23 |
+
"32",
|
| 24 |
+
"--save-every",
|
| 25 |
+
"2000",
|
| 26 |
+
"--log-every",
|
| 27 |
+
"50",
|
| 28 |
+
"--cache-dir",
|
| 29 |
+
"/dev/shm/hb_act_cache_a21",
|
| 30 |
+
"--inloop-task",
|
| 31 |
+
"a21",
|
| 32 |
+
"--inloop-code",
|
| 33 |
+
"/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse"
|
| 34 |
+
],
|
| 35 |
+
"started": "2026-11-26T04:33:45",
|
| 36 |
+
"host": "dlc19te5fv9wtn5t-worker-0",
|
| 37 |
+
"torch": "2.9.0+cu128",
|
| 38 |
+
"policy": {
|
| 39 |
+
"policy": "act",
|
| 40 |
+
"n_cameras": 2,
|
| 41 |
+
"state_dim": 44,
|
| 42 |
+
"action_dim": 76,
|
| 43 |
+
"horizon": 16,
|
| 44 |
+
"backbone": "resnet18",
|
| 45 |
+
"backbone_weights": "IMAGENET1K_V1",
|
| 46 |
+
"backbone_norm": "frozen_bn",
|
| 47 |
+
"hidden_dim": 384,
|
| 48 |
+
"num_layers": 4,
|
| 49 |
+
"num_heads": 8,
|
| 50 |
+
"mlp_ratio": 4.0,
|
| 51 |
+
"dropout": 0.1,
|
| 52 |
+
"time_embed_dim": 128,
|
| 53 |
+
"num_inference_steps": null,
|
| 54 |
+
"num_train_timesteps": 100,
|
| 55 |
+
"beta_schedule": "squaredcos_cap_v2",
|
| 56 |
+
"prediction_type": "epsilon",
|
| 57 |
+
"clip_sample": true,
|
| 58 |
+
"act_hidden_dim": 512,
|
| 59 |
+
"dim_feedforward": 3200,
|
| 60 |
+
"enc_layers": 4,
|
| 61 |
+
"dec_layers": 7,
|
| 62 |
+
"nheads": 8,
|
| 63 |
+
"latent_dim": 32,
|
| 64 |
+
"kl_weight": 10.0,
|
| 65 |
+
"ode_body_dim": null,
|
| 66 |
+
"ode_width": 512,
|
| 67 |
+
"ode_layers": 4,
|
| 68 |
+
"ode_cond_dim": 512,
|
| 69 |
+
"ode_field_scale": 1.0,
|
| 70 |
+
"ode_dit_hidden": 512,
|
| 71 |
+
"ode_dit_layers": 4,
|
| 72 |
+
"ode_dit_heads": 8,
|
| 73 |
+
"ode_dit_tokens": 4,
|
| 74 |
+
"extra": {}
|
| 75 |
+
},
|
| 76 |
+
"contract": {
|
| 77 |
+
"name": "g1_sonic_dfx6",
|
| 78 |
+
"robot": "g1",
|
| 79 |
+
"cameras": [
|
| 80 |
+
"ego_view",
|
| 81 |
+
"chest"
|
| 82 |
+
],
|
| 83 |
+
"state": [
|
| 84 |
+
[
|
| 85 |
+
"observation.state",
|
| 86 |
+
0,
|
| 87 |
+
29
|
| 88 |
+
],
|
| 89 |
+
[
|
| 90 |
+
"observation.inspire_left_hand_state",
|
| 91 |
+
0,
|
| 92 |
+
6
|
| 93 |
+
],
|
| 94 |
+
[
|
| 95 |
+
"observation.inspire_right_hand_state",
|
| 96 |
+
0,
|
| 97 |
+
6
|
| 98 |
+
],
|
| 99 |
+
[
|
| 100 |
+
"observation.projected_gravity",
|
| 101 |
+
0,
|
| 102 |
+
3
|
| 103 |
+
]
|
| 104 |
+
],
|
| 105 |
+
"action": [
|
| 106 |
+
[
|
| 107 |
+
"action.motion_token",
|
| 108 |
+
0,
|
| 109 |
+
64
|
| 110 |
+
],
|
| 111 |
+
[
|
| 112 |
+
"observation.inspire_left_hand_state",
|
| 113 |
+
0,
|
| 114 |
+
6
|
| 115 |
+
],
|
| 116 |
+
[
|
| 117 |
+
"observation.inspire_right_hand_state",
|
| 118 |
+
0,
|
| 119 |
+
6
|
| 120 |
+
]
|
| 121 |
+
],
|
| 122 |
+
"state_dim": 44,
|
| 123 |
+
"action_dim": 76,
|
| 124 |
+
"action_space": "sonic_dfx6",
|
| 125 |
+
"body_dims": 29
|
| 126 |
+
},
|
| 127 |
+
"image_hw": [
|
| 128 |
+
168,
|
| 129 |
+
224
|
| 130 |
+
],
|
| 131 |
+
"task_text": "Grasp the basket handle with the right hand from the floor, stand up while retaining it, carry it to the long desk, then place and release it on the tabletop.",
|
| 132 |
+
"dataset": {
|
| 133 |
+
"name": "data",
|
| 134 |
+
"root": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a21-floor-transfer-basket-682f2bf/data",
|
| 135 |
+
"robot_type": null,
|
| 136 |
+
"fps": 30.0,
|
| 137 |
+
"episodes": [
|
| 138 |
+
0,
|
| 139 |
+
1,
|
| 140 |
+
2,
|
| 141 |
+
3,
|
| 142 |
+
4,
|
| 143 |
+
5,
|
| 144 |
+
6,
|
| 145 |
+
7,
|
| 146 |
+
8,
|
| 147 |
+
9,
|
| 148 |
+
10,
|
| 149 |
+
11,
|
| 150 |
+
12,
|
| 151 |
+
13,
|
| 152 |
+
14,
|
| 153 |
+
15,
|
| 154 |
+
16,
|
| 155 |
+
17,
|
| 156 |
+
18,
|
| 157 |
+
19,
|
| 158 |
+
20,
|
| 159 |
+
21,
|
| 160 |
+
22,
|
| 161 |
+
23,
|
| 162 |
+
24,
|
| 163 |
+
25,
|
| 164 |
+
26,
|
| 165 |
+
27,
|
| 166 |
+
28,
|
| 167 |
+
29,
|
| 168 |
+
30,
|
| 169 |
+
31,
|
| 170 |
+
32,
|
| 171 |
+
33,
|
| 172 |
+
34,
|
| 173 |
+
35,
|
| 174 |
+
36,
|
| 175 |
+
37,
|
| 176 |
+
38,
|
| 177 |
+
39,
|
| 178 |
+
40,
|
| 179 |
+
41,
|
| 180 |
+
42,
|
| 181 |
+
43,
|
| 182 |
+
44,
|
| 183 |
+
45,
|
| 184 |
+
46,
|
| 185 |
+
47,
|
| 186 |
+
48,
|
| 187 |
+
49,
|
| 188 |
+
50,
|
| 189 |
+
51,
|
| 190 |
+
52,
|
| 191 |
+
53,
|
| 192 |
+
54,
|
| 193 |
+
55,
|
| 194 |
+
56,
|
| 195 |
+
57,
|
| 196 |
+
58,
|
| 197 |
+
59,
|
| 198 |
+
60,
|
| 199 |
+
61,
|
| 200 |
+
62,
|
| 201 |
+
63,
|
| 202 |
+
64,
|
| 203 |
+
65,
|
| 204 |
+
66,
|
| 205 |
+
67,
|
| 206 |
+
68,
|
| 207 |
+
69,
|
| 208 |
+
70,
|
| 209 |
+
71,
|
| 210 |
+
72,
|
| 211 |
+
73,
|
| 212 |
+
74,
|
| 213 |
+
75,
|
| 214 |
+
76,
|
| 215 |
+
77,
|
| 216 |
+
78,
|
| 217 |
+
79,
|
| 218 |
+
80,
|
| 219 |
+
81,
|
| 220 |
+
82,
|
| 221 |
+
83,
|
| 222 |
+
84,
|
| 223 |
+
85,
|
| 224 |
+
86,
|
| 225 |
+
87,
|
| 226 |
+
88,
|
| 227 |
+
89,
|
| 228 |
+
90,
|
| 229 |
+
91,
|
| 230 |
+
92,
|
| 231 |
+
93,
|
| 232 |
+
94,
|
| 233 |
+
95,
|
| 234 |
+
96,
|
| 235 |
+
97,
|
| 236 |
+
98,
|
| 237 |
+
99
|
| 238 |
+
],
|
| 239 |
+
"train_episodes": [
|
| 240 |
+
0,
|
| 241 |
+
1,
|
| 242 |
+
2,
|
| 243 |
+
3,
|
| 244 |
+
4,
|
| 245 |
+
5,
|
| 246 |
+
6,
|
| 247 |
+
7,
|
| 248 |
+
8,
|
| 249 |
+
9,
|
| 250 |
+
10,
|
| 251 |
+
11,
|
| 252 |
+
12,
|
| 253 |
+
13,
|
| 254 |
+
14,
|
| 255 |
+
15,
|
| 256 |
+
16,
|
| 257 |
+
17,
|
| 258 |
+
18,
|
| 259 |
+
19,
|
| 260 |
+
20,
|
| 261 |
+
21,
|
| 262 |
+
22,
|
| 263 |
+
23,
|
| 264 |
+
24,
|
| 265 |
+
25,
|
| 266 |
+
26,
|
| 267 |
+
27,
|
| 268 |
+
28,
|
| 269 |
+
29,
|
| 270 |
+
30,
|
| 271 |
+
31,
|
| 272 |
+
32,
|
| 273 |
+
33,
|
| 274 |
+
34,
|
| 275 |
+
35,
|
| 276 |
+
36,
|
| 277 |
+
37,
|
| 278 |
+
38,
|
| 279 |
+
39,
|
| 280 |
+
40,
|
| 281 |
+
41,
|
| 282 |
+
42,
|
| 283 |
+
43,
|
| 284 |
+
44,
|
| 285 |
+
45,
|
| 286 |
+
46,
|
| 287 |
+
47,
|
| 288 |
+
48,
|
| 289 |
+
49,
|
| 290 |
+
50,
|
| 291 |
+
51,
|
| 292 |
+
52,
|
| 293 |
+
53,
|
| 294 |
+
54,
|
| 295 |
+
55,
|
| 296 |
+
56,
|
| 297 |
+
57,
|
| 298 |
+
58,
|
| 299 |
+
59,
|
| 300 |
+
60,
|
| 301 |
+
61,
|
| 302 |
+
62,
|
| 303 |
+
63,
|
| 304 |
+
64,
|
| 305 |
+
65,
|
| 306 |
+
66,
|
| 307 |
+
67,
|
| 308 |
+
68,
|
| 309 |
+
69,
|
| 310 |
+
70,
|
| 311 |
+
71,
|
| 312 |
+
72,
|
| 313 |
+
73,
|
| 314 |
+
74,
|
| 315 |
+
75,
|
| 316 |
+
76,
|
| 317 |
+
77,
|
| 318 |
+
78,
|
| 319 |
+
79,
|
| 320 |
+
80,
|
| 321 |
+
81,
|
| 322 |
+
82,
|
| 323 |
+
83,
|
| 324 |
+
84,
|
| 325 |
+
85,
|
| 326 |
+
86,
|
| 327 |
+
87,
|
| 328 |
+
88,
|
| 329 |
+
89,
|
| 330 |
+
90,
|
| 331 |
+
91,
|
| 332 |
+
92,
|
| 333 |
+
93,
|
| 334 |
+
94,
|
| 335 |
+
95,
|
| 336 |
+
96,
|
| 337 |
+
97,
|
| 338 |
+
98,
|
| 339 |
+
99
|
| 340 |
+
],
|
| 341 |
+
"val_episodes": [],
|
| 342 |
+
"train_frames": 86706,
|
| 343 |
+
"git_commit": null
|
| 344 |
+
},
|
| 345 |
+
"training": {
|
| 346 |
+
"steps": 4000,
|
| 347 |
+
"batch_size": 512,
|
| 348 |
+
"lr": 0.0001,
|
| 349 |
+
"betas": [
|
| 350 |
+
0.95,
|
| 351 |
+
0.999
|
| 352 |
+
],
|
| 353 |
+
"weight_decay": 1e-06,
|
| 354 |
+
"warmup": 200,
|
| 355 |
+
"schedule": "linear warm-up + cosine",
|
| 356 |
+
"backbone_lr_scale": 0.1,
|
| 357 |
+
"ema": 0.9999,
|
| 358 |
+
"shift_px": 0,
|
| 359 |
+
"amp": true,
|
| 360 |
+
"seed": 0,
|
| 361 |
+
"augmentation": {
|
| 362 |
+
"spec": "docs/augmentation_v2.md",
|
| 363 |
+
"version": "hb-aug-v2-20261109",
|
| 364 |
+
"implementation": "evaluation/augmentation/hb_aug_v2.py",
|
| 365 |
+
"visual": {
|
| 366 |
+
"effects": [
|
| 367 |
+
"exposure",
|
| 368 |
+
"contrast",
|
| 369 |
+
"saturation",
|
| 370 |
+
"hue",
|
| 371 |
+
"gamma",
|
| 372 |
+
"temperature",
|
| 373 |
+
"rotation_crop",
|
| 374 |
+
"noise",
|
| 375 |
+
"gaussian_blur",
|
| 376 |
+
"jpeg",
|
| 377 |
+
"motion_blur",
|
| 378 |
+
"sharpen",
|
| 379 |
+
"defocus",
|
| 380 |
+
"light_shadow",
|
| 381 |
+
"wb_channel"
|
| 382 |
+
],
|
| 383 |
+
"boosted_per_sample": 1,
|
| 384 |
+
"boost": 1.5,
|
| 385 |
+
"pixel_scale": "H / 224",
|
| 386 |
+
"future_targets": "none (one observation frame)"
|
| 387 |
+
},
|
| 388 |
+
"proprio": {
|
| 389 |
+
"robot": "g1",
|
| 390 |
+
"body_dims": 29,
|
| 391 |
+
"bias_deg": 2.0,
|
| 392 |
+
"bias_scope": "per_sample",
|
| 393 |
+
"noise_deg": 0.25,
|
| 394 |
+
"noise_clip_sigma": 3,
|
| 395 |
+
"delay_probability": 0.0,
|
| 396 |
+
"history_drop_probability": 0.0,
|
| 397 |
+
"velocity": false
|
| 398 |
+
},
|
| 399 |
+
"native_image_augmentation": "off",
|
| 400 |
+
"evaluation": "off"
|
| 401 |
+
},
|
| 402 |
+
"preflight": {
|
| 403 |
+
"samples": 64,
|
| 404 |
+
"state_dim": 44,
|
| 405 |
+
"body_dims": 29,
|
| 406 |
+
"images_changed": 64,
|
| 407 |
+
"body_values_moved": 1.0,
|
| 408 |
+
"max_body_offset_deg": 2.7234,
|
| 409 |
+
"actions_bit_identical": true,
|
| 410 |
+
"non_body_state_bit_identical": true,
|
| 411 |
+
"eval_items_deterministic": 8
|
| 412 |
+
},
|
| 413 |
+
"aug_seed": 0,
|
| 414 |
+
"layout": {
|
| 415 |
+
"nodes": 1,
|
| 416 |
+
"gpus": 1,
|
| 417 |
+
"per_gpu_batch": 512,
|
| 418 |
+
"global_batch": 512,
|
| 419 |
+
"gradient_accumulation": 1,
|
| 420 |
+
"num_workers": 32,
|
| 421 |
+
"prefetch": 2
|
| 422 |
+
},
|
| 423 |
+
"ema_schedule": "hb",
|
| 424 |
+
"inloop": {
|
| 425 |
+
"task": "a21",
|
| 426 |
+
"code": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse",
|
| 427 |
+
"every": 250,
|
| 428 |
+
"exception": null
|
| 429 |
+
}
|
| 430 |
+
},
|
| 431 |
+
"stats": {
|
| 432 |
+
"state": {
|
| 433 |
+
"min": [
|
| 434 |
+
-2.2701830863952637,
|
| 435 |
+
-0.27317631244659424,
|
| 436 |
+
-0.29610729217529297,
|
| 437 |
+
0.10485819727182388,
|
| 438 |
+
-0.81209796667099,
|
| 439 |
+
-0.21175283193588257,
|
| 440 |
+
-2.262223958969116,
|
| 441 |
+
-0.46441030502319336,
|
| 442 |
+
-0.6099045872688293,
|
| 443 |
+
0.09954386949539185,
|
| 444 |
+
-0.7311134338378906,
|
| 445 |
+
-0.17378051578998566,
|
| 446 |
+
-0.1402929723262787,
|
| 447 |
+
-0.2614355683326721,
|
| 448 |
+
-0.046818941831588745,
|
| 449 |
+
-0.9373753666877747,
|
| 450 |
+
0.15214943885803223,
|
| 451 |
+
-1.0694174766540527,
|
| 452 |
+
0.18463465571403503,
|
| 453 |
+
-0.6166611313819885,
|
| 454 |
+
-0.4238741397857666,
|
| 455 |
+
-0.39084500074386597,
|
| 456 |
+
-1.7910548448562622,
|
| 457 |
+
-2.0524444580078125,
|
| 458 |
+
-0.4358607530593872,
|
| 459 |
+
-0.8722407817840576,
|
| 460 |
+
-1.8015098571777344,
|
| 461 |
+
-0.9958140850067139,
|
| 462 |
+
-0.7694652080535889,
|
| 463 |
+
0.9996309876441956,
|
| 464 |
+
0.9991293549537659,
|
| 465 |
+
0.9988874793052673,
|
| 466 |
+
0.9989415407180786,
|
| 467 |
+
0.9291336536407471,
|
| 468 |
+
0.9961293935775757,
|
| 469 |
+
0.3990069329738617,
|
| 470 |
+
0.3997034728527069,
|
| 471 |
+
0.39968419075012207,
|
| 472 |
+
0.40040892362594604,
|
| 473 |
+
0.5608876347541809,
|
| 474 |
+
0.0,
|
| 475 |
+
-0.1512877494096756,
|
| 476 |
+
-0.11685285717248917,
|
| 477 |
+
-1.0
|
| 478 |
+
],
|
| 479 |
+
"max": [
|
| 480 |
+
0.17076119780540466,
|
| 481 |
+
0.3236110508441925,
|
| 482 |
+
0.3831687271595001,
|
| 483 |
+
2.233388662338257,
|
| 484 |
+
0.19882787764072418,
|
| 485 |
+
0.17680993676185608,
|
| 486 |
+
0.1359129548072815,
|
| 487 |
+
0.10904774814844131,
|
| 488 |
+
0.27671802043914795,
|
| 489 |
+
2.1933090686798096,
|
| 490 |
+
0.1425849199295044,
|
| 491 |
+
0.21501344442367554,
|
| 492 |
+
0.22832152247428894,
|
| 493 |
+
0.2842406630516052,
|
| 494 |
+
0.5884646773338318,
|
| 495 |
+
0.3037309944629669,
|
| 496 |
+
0.7819540500640869,
|
| 497 |
+
0.04043177142739296,
|
| 498 |
+
1.388787031173706,
|
| 499 |
+
0.24945037066936493,
|
| 500 |
+
0.1306280493736267,
|
| 501 |
+
0.20737355947494507,
|
| 502 |
+
0.19802188873291016,
|
| 503 |
+
0.08976307511329651,
|
| 504 |
+
1.5246615409851074,
|
| 505 |
+
1.407419204711914,
|
| 506 |
+
0.8123467564582825,
|
| 507 |
+
1.1947879791259766,
|
| 508 |
+
1.6157052516937256,
|
| 509 |
+
1.0,
|
| 510 |
+
1.0,
|
| 511 |
+
1.0,
|
| 512 |
+
1.0,
|
| 513 |
+
1.0,
|
| 514 |
+
1.0,
|
| 515 |
+
1.0,
|
| 516 |
+
1.0,
|
| 517 |
+
1.0,
|
| 518 |
+
1.0,
|
| 519 |
+
1.0,
|
| 520 |
+
1.0,
|
| 521 |
+
0.639435887336731,
|
| 522 |
+
0.09351898729801178,
|
| 523 |
+
-0.7681906223297119
|
| 524 |
+
],
|
| 525 |
+
"mean": [
|
| 526 |
+
-0.7531668394892643,
|
| 527 |
+
0.08920568545369893,
|
| 528 |
+
0.07067044259490517,
|
| 529 |
+
0.7642513375470761,
|
| 530 |
+
-0.1636458593013806,
|
| 531 |
+
-0.023583596530965978,
|
| 532 |
+
-0.7028838506918503,
|
| 533 |
+
-0.13150115730668355,
|
| 534 |
+
-0.13060744123825166,
|
| 535 |
+
0.8397792745552163,
|
| 536 |
+
-0.29642171881210544,
|
| 537 |
+
0.023404424733916872,
|
| 538 |
+
0.03323390034310277,
|
| 539 |
+
0.005153534859300528,
|
| 540 |
+
0.12670043594070385,
|
| 541 |
+
-0.12135132512904276,
|
| 542 |
+
0.32688682632575744,
|
| 543 |
+
-0.34025291048965384,
|
| 544 |
+
1.0064546460331283,
|
| 545 |
+
-0.22132733376049174,
|
| 546 |
+
-0.09390540696381505,
|
| 547 |
+
0.0020294867516669796,
|
| 548 |
+
-0.9347671857865999,
|
| 549 |
+
-0.5446749532985431,
|
| 550 |
+
0.3699779073214432,
|
| 551 |
+
0.6207957483288243,
|
| 552 |
+
-0.7479217756695453,
|
| 553 |
+
0.12144748586150506,
|
| 554 |
+
0.12118187016003243,
|
| 555 |
+
0.9999840190987344,
|
| 556 |
+
0.9999818626109905,
|
| 557 |
+
0.9999802706920957,
|
| 558 |
+
0.9999796302992863,
|
| 559 |
+
0.997536483784903,
|
| 560 |
+
0.9997633830999401,
|
| 561 |
+
0.6985039807005555,
|
| 562 |
+
0.6984985546667931,
|
| 563 |
+
0.6985102459092983,
|
| 564 |
+
0.6989350363811875,
|
| 565 |
+
0.7882137827426893,
|
| 566 |
+
0.14730287148854837,
|
| 567 |
+
0.1697078753632969,
|
| 568 |
+
-0.014566843709871236,
|
| 569 |
+
-0.951296124115036
|
| 570 |
+
],
|
| 571 |
+
"std": [
|
| 572 |
+
0.8702993367372945,
|
| 573 |
+
0.06537943029111525,
|
| 574 |
+
0.07654780244438013,
|
| 575 |
+
0.7112500999676913,
|
| 576 |
+
0.145283198895165,
|
| 577 |
+
0.047866697406743985,
|
| 578 |
+
0.8545553679812813,
|
| 579 |
+
0.0720881483654181,
|
| 580 |
+
0.1478987551211821,
|
| 581 |
+
0.7925819593075105,
|
| 582 |
+
0.22834769005058556,
|
| 583 |
+
0.050678510432579586,
|
| 584 |
+
0.046478733386081675,
|
| 585 |
+
0.03356911096437694,
|
| 586 |
+
0.1052938605753584,
|
| 587 |
+
0.3001636421580595,
|
| 588 |
+
0.08770922543021444,
|
| 589 |
+
0.22980924646231987,
|
| 590 |
+
0.19216837631975336,
|
| 591 |
+
0.11281399341997446,
|
| 592 |
+
0.12302227799457731,
|
| 593 |
+
0.06405779462644502,
|
| 594 |
+
0.4714357774335524,
|
| 595 |
+
0.24364128399266738,
|
| 596 |
+
0.2753097937162136,
|
| 597 |
+
0.4954273787478825,
|
| 598 |
+
0.4550380536420718,
|
| 599 |
+
0.17488023028147637,
|
| 600 |
+
0.4290372100442338,
|
| 601 |
+
1.8502286312077823e-05,
|
| 602 |
+
2.8853457272592953e-05,
|
| 603 |
+
3.9121279481955076e-05,
|
| 604 |
+
3.6852514097164415e-05,
|
| 605 |
+
0.0025758735618069276,
|
| 606 |
+
0.00013232718803578354,
|
| 607 |
+
0.29804922992520444,
|
| 608 |
+
0.2979910347481662,
|
| 609 |
+
0.297951069217773,
|
| 610 |
+
0.29750204841817435,
|
| 611 |
+
0.20818212208894177,
|
| 612 |
+
0.34110249080644384,
|
| 613 |
+
0.24458060944891366,
|
| 614 |
+
0.02926279635978709,
|
| 615 |
+
0.07312142435045
|
| 616 |
+
]
|
| 617 |
+
},
|
| 618 |
+
"action": {
|
| 619 |
+
"min": [
|
| 620 |
+
-0.25,
|
| 621 |
+
-0.625,
|
| 622 |
+
-0.5625,
|
| 623 |
+
-0.3125,
|
| 624 |
+
-0.5625,
|
| 625 |
+
-0.5625,
|
| 626 |
+
-0.375,
|
| 627 |
+
-0.75,
|
| 628 |
+
-0.625,
|
| 629 |
+
-0.1875,
|
| 630 |
+
-0.75,
|
| 631 |
+
-0.3125,
|
| 632 |
+
-0.4375,
|
| 633 |
+
-0.375,
|
| 634 |
+
-0.6875,
|
| 635 |
+
-0.5625,
|
| 636 |
+
-0.625,
|
| 637 |
+
-0.375,
|
| 638 |
+
-0.5625,
|
| 639 |
+
-0.4375,
|
| 640 |
+
-0.375,
|
| 641 |
+
-0.5,
|
| 642 |
+
-0.4375,
|
| 643 |
+
-0.4375,
|
| 644 |
+
-0.5625,
|
| 645 |
+
0.0625,
|
| 646 |
+
-0.4375,
|
| 647 |
+
-0.4375,
|
| 648 |
+
-0.375,
|
| 649 |
+
-0.4375,
|
| 650 |
+
-0.0625,
|
| 651 |
+
-0.25,
|
| 652 |
+
-0.3125,
|
| 653 |
+
-0.4375,
|
| 654 |
+
-0.4375,
|
| 655 |
+
-0.625,
|
| 656 |
+
-0.25,
|
| 657 |
+
-0.8125,
|
| 658 |
+
-0.3125,
|
| 659 |
+
-0.1875,
|
| 660 |
+
-0.4375,
|
| 661 |
+
-0.5,
|
| 662 |
+
-0.3125,
|
| 663 |
+
0.0,
|
| 664 |
+
-0.625,
|
| 665 |
+
-0.3125,
|
| 666 |
+
-0.6875,
|
| 667 |
+
-0.375,
|
| 668 |
+
-0.125,
|
| 669 |
+
-0.625,
|
| 670 |
+
-0.375,
|
| 671 |
+
-0.8125,
|
| 672 |
+
-0.4375,
|
| 673 |
+
-0.625,
|
| 674 |
+
-0.3125,
|
| 675 |
+
-0.4375,
|
| 676 |
+
-0.4375,
|
| 677 |
+
-0.75,
|
| 678 |
+
-0.625,
|
| 679 |
+
-0.375,
|
| 680 |
+
-0.625,
|
| 681 |
+
-0.4375,
|
| 682 |
+
-0.4375,
|
| 683 |
+
-0.3125,
|
| 684 |
+
0.9996309876441956,
|
| 685 |
+
0.9991293549537659,
|
| 686 |
+
0.9988874793052673,
|
| 687 |
+
0.9989415407180786,
|
| 688 |
+
0.9291336536407471,
|
| 689 |
+
0.9961293935775757,
|
| 690 |
+
0.3990069329738617,
|
| 691 |
+
0.3997034728527069,
|
| 692 |
+
0.39968419075012207,
|
| 693 |
+
0.40040892362594604,
|
| 694 |
+
0.5608876347541809,
|
| 695 |
+
0.0
|
| 696 |
+
],
|
| 697 |
+
"max": [
|
| 698 |
+
0.5,
|
| 699 |
+
0.3125,
|
| 700 |
+
0.5,
|
| 701 |
+
0.4375,
|
| 702 |
+
0.25,
|
| 703 |
+
0.25,
|
| 704 |
+
0.3125,
|
| 705 |
+
0.1875,
|
| 706 |
+
0.375,
|
| 707 |
+
0.375,
|
| 708 |
+
0.125,
|
| 709 |
+
0.375,
|
| 710 |
+
0.4375,
|
| 711 |
+
0.4375,
|
| 712 |
+
0.3125,
|
| 713 |
+
0.25,
|
| 714 |
+
0.4375,
|
| 715 |
+
0.5625,
|
| 716 |
+
0.125,
|
| 717 |
+
0.5625,
|
| 718 |
+
0.1875,
|
| 719 |
+
0.125,
|
| 720 |
+
0.5,
|
| 721 |
+
0.375,
|
| 722 |
+
0.0625,
|
| 723 |
+
0.5625,
|
| 724 |
+
0.1875,
|
| 725 |
+
0.25,
|
| 726 |
+
0.3125,
|
| 727 |
+
0.25,
|
| 728 |
+
0.6875,
|
| 729 |
+
0.4375,
|
| 730 |
+
0.3125,
|
| 731 |
+
0.4375,
|
| 732 |
+
0.5,
|
| 733 |
+
0.25,
|
| 734 |
+
0.625,
|
| 735 |
+
0.125,
|
| 736 |
+
0.375,
|
| 737 |
+
0.5625,
|
| 738 |
+
0.1875,
|
| 739 |
+
0.375,
|
| 740 |
+
0.25,
|
| 741 |
+
0.5,
|
| 742 |
+
0.1875,
|
| 743 |
+
0.5,
|
| 744 |
+
0.4375,
|
| 745 |
+
0.3125,
|
| 746 |
+
0.5625,
|
| 747 |
+
0.25,
|
| 748 |
+
0.375,
|
| 749 |
+
0.375,
|
| 750 |
+
0.6875,
|
| 751 |
+
0.1875,
|
| 752 |
+
0.5,
|
| 753 |
+
0.625,
|
| 754 |
+
0.5,
|
| 755 |
+
0.375,
|
| 756 |
+
0.375,
|
| 757 |
+
0.5,
|
| 758 |
+
0.125,
|
| 759 |
+
0.625,
|
| 760 |
+
0.4375,
|
| 761 |
+
0.6875,
|
| 762 |
+
1.0,
|
| 763 |
+
1.0,
|
| 764 |
+
1.0,
|
| 765 |
+
1.0,
|
| 766 |
+
1.0,
|
| 767 |
+
1.0,
|
| 768 |
+
1.0,
|
| 769 |
+
1.0,
|
| 770 |
+
1.0,
|
| 771 |
+
1.0,
|
| 772 |
+
1.0,
|
| 773 |
+
1.0
|
| 774 |
+
],
|
| 775 |
+
"mean": [
|
| 776 |
+
0.20233245104145042,
|
| 777 |
+
-0.15635379904504879,
|
| 778 |
+
0.1067746176735174,
|
| 779 |
+
0.1295577872350241,
|
| 780 |
+
-0.15413581528383272,
|
| 781 |
+
-0.24018450280257422,
|
| 782 |
+
0.04108495951837243,
|
| 783 |
+
-0.22379362443198855,
|
| 784 |
+
-0.09086380988628238,
|
| 785 |
+
0.051021555601688466,
|
| 786 |
+
-0.3685197679514682,
|
| 787 |
+
0.08125518995225244,
|
| 788 |
+
-0.03551801490092958,
|
| 789 |
+
-0.014731535303208544,
|
| 790 |
+
-0.19714538209581806,
|
| 791 |
+
-0.213527610545983,
|
| 792 |
+
-0.00988757986759855,
|
| 793 |
+
0.08513684174105599,
|
| 794 |
+
-0.22502335478513597,
|
| 795 |
+
0.07740020875141282,
|
| 796 |
+
-0.1662010126173506,
|
| 797 |
+
-0.24570747699121168,
|
| 798 |
+
-0.06387389569349296,
|
| 799 |
+
-0.050509768643461815,
|
| 800 |
+
-0.1940551980255115,
|
| 801 |
+
0.34620225243927755,
|
| 802 |
+
-0.19457203077065024,
|
| 803 |
+
-0.17379996770696376,
|
| 804 |
+
0.0011360228819228197,
|
| 805 |
+
-0.08769433487878578,
|
| 806 |
+
0.3568322838096556,
|
| 807 |
+
0.1458167543191936,
|
| 808 |
+
-0.02182663252831407,
|
| 809 |
+
0.06301971605194566,
|
| 810 |
+
0.0789910732821258,
|
| 811 |
+
-0.3288296081009388,
|
| 812 |
+
0.1761289587802459,
|
| 813 |
+
-0.35309407653449587,
|
| 814 |
+
-0.05148288469079418,
|
| 815 |
+
0.18985494083454432,
|
| 816 |
+
-0.09348833990727286,
|
| 817 |
+
-0.12202947316218024,
|
| 818 |
+
-0.10901494706248703,
|
| 819 |
+
0.26305272991488476,
|
| 820 |
+
-0.22518193665951605,
|
| 821 |
+
-0.027526930085576547,
|
| 822 |
+
-0.16906990289022675,
|
| 823 |
+
-0.015603735612299033,
|
| 824 |
+
0.20928987036652597,
|
| 825 |
+
-0.2469970359606025,
|
| 826 |
+
-0.03280698567573178,
|
| 827 |
+
-0.1797648086637603,
|
| 828 |
+
0.3433283163794893,
|
| 829 |
+
-0.20959910502156714,
|
| 830 |
+
0.04331375568011441,
|
| 831 |
+
0.2624104733236454,
|
| 832 |
+
-0.12965365718635388,
|
| 833 |
+
-0.10195733282587134,
|
| 834 |
+
-0.3011585126750167,
|
| 835 |
+
0.17579233271053907,
|
| 836 |
+
-0.25617388070029756,
|
| 837 |
+
0.17960766844278367,
|
| 838 |
+
0.12395984706940696,
|
| 839 |
+
0.2832128111088045,
|
| 840 |
+
0.9999840190987344,
|
| 841 |
+
0.9999818626109905,
|
| 842 |
+
0.9999802706920957,
|
| 843 |
+
0.9999796302992863,
|
| 844 |
+
0.997536483784903,
|
| 845 |
+
0.9997633830999401,
|
| 846 |
+
0.6985039807005555,
|
| 847 |
+
0.6984985546667931,
|
| 848 |
+
0.6985102459092983,
|
| 849 |
+
0.6989350363811875,
|
| 850 |
+
0.7882137827426893,
|
| 851 |
+
0.14730287148854837
|
| 852 |
+
],
|
| 853 |
+
"std": [
|
| 854 |
+
0.14387889849464017,
|
| 855 |
+
0.22002725850755592,
|
| 856 |
+
0.17023058244057782,
|
| 857 |
+
0.12799376567512302,
|
| 858 |
+
0.14669566547477705,
|
| 859 |
+
0.17137918871048685,
|
| 860 |
+
0.10837036550509957,
|
| 861 |
+
0.24967630650194603,
|
| 862 |
+
0.3167673937030814,
|
| 863 |
+
0.13791457708463964,
|
| 864 |
+
0.1558879249225253,
|
| 865 |
+
0.10944088727655074,
|
| 866 |
+
0.21023136387156308,
|
| 867 |
+
0.13129675029615331,
|
| 868 |
+
0.2763938721515471,
|
| 869 |
+
0.14623609832182455,
|
| 870 |
+
0.35032697342667946,
|
| 871 |
+
0.14687161314161287,
|
| 872 |
+
0.09447772092749067,
|
| 873 |
+
0.28749075482259157,
|
| 874 |
+
0.10602082258665294,
|
| 875 |
+
0.13892427833485307,
|
| 876 |
+
0.16994943275056978,
|
| 877 |
+
0.1442771380532549,
|
| 878 |
+
0.0977608285517821,
|
| 879 |
+
0.08765465031102393,
|
| 880 |
+
0.14403055417943056,
|
| 881 |
+
0.1492474485468382,
|
| 882 |
+
0.13164447070933707,
|
| 883 |
+
0.1500123078688166,
|
| 884 |
+
0.17029337028108626,
|
| 885 |
+
0.11127976794851127,
|
| 886 |
+
0.09071197151363286,
|
| 887 |
+
0.22299894138544968,
|
| 888 |
+
0.30077203584339085,
|
| 889 |
+
0.19527291668407834,
|
| 890 |
+
0.15449669204830557,
|
| 891 |
+
0.2616432744537317,
|
| 892 |
+
0.10971484752905038,
|
| 893 |
+
0.2031555804379325,
|
| 894 |
+
0.15751704689763124,
|
| 895 |
+
0.20958523064765439,
|
| 896 |
+
0.07314237295780124,
|
| 897 |
+
0.10866238282425084,
|
| 898 |
+
0.20908864030616714,
|
| 899 |
+
0.22004042023819897,
|
| 900 |
+
0.2893527840649329,
|
| 901 |
+
0.13174662906263046,
|
| 902 |
+
0.10049584022270718,
|
| 903 |
+
0.19328266323665458,
|
| 904 |
+
0.09645590365939917,
|
| 905 |
+
0.3613390428120311,
|
| 906 |
+
0.28011666359209003,
|
| 907 |
+
0.18888580642737607,
|
| 908 |
+
0.25113400201108055,
|
| 909 |
+
0.2307348262267991,
|
| 910 |
+
0.25063238299275425,
|
| 911 |
+
0.42747866380539706,
|
| 912 |
+
0.20811619893271996,
|
| 913 |
+
0.15748165255971092,
|
| 914 |
+
0.11924260634895344,
|
| 915 |
+
0.27838897468038204,
|
| 916 |
+
0.14163213034462338,
|
| 917 |
+
0.25291184983402537,
|
| 918 |
+
1.8502286312077823e-05,
|
| 919 |
+
2.8853457272592953e-05,
|
| 920 |
+
3.9121279481955076e-05,
|
| 921 |
+
3.6852514097164415e-05,
|
| 922 |
+
0.0025758735618069276,
|
| 923 |
+
0.00013232718803578354,
|
| 924 |
+
0.29804922992520444,
|
| 925 |
+
0.2979910347481662,
|
| 926 |
+
0.297951069217773,
|
| 927 |
+
0.29750204841817435,
|
| 928 |
+
0.20818212208894177,
|
| 929 |
+
0.34110249080644384
|
| 930 |
+
]
|
| 931 |
+
}
|
| 932 |
+
},
|
| 933 |
+
"code_commit": "2c91a514d65897635ae769a3e00d318a9be385cb"
|
| 934 |
+
}
|
a21-floor-basket-transfer/b512/step-004000/training_records/train.log
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "frame_cache", "camera": "ego_view", "episodes": 20, "of": 100}
|
| 2 |
+
{"event": "frame_cache", "camera": "ego_view", "episodes": 40, "of": 100}
|
| 3 |
+
{"event": "frame_cache", "camera": "ego_view", "episodes": 60, "of": 100}
|
| 4 |
+
{"event": "frame_cache", "camera": "ego_view", "episodes": 80, "of": 100}
|
| 5 |
+
{"event": "frame_cache", "camera": "ego_view", "episodes": 100, "of": 100}
|
| 6 |
+
{"event": "frame_cache", "camera": "chest", "episodes": 20, "of": 100}
|
| 7 |
+
{"event": "frame_cache", "camera": "chest", "episodes": 40, "of": 100}
|
| 8 |
+
{"event": "frame_cache", "camera": "chest", "episodes": 60, "of": 100}
|
| 9 |
+
{"event": "frame_cache", "camera": "chest", "episodes": 80, "of": 100}
|
| 10 |
+
{"event": "frame_cache", "camera": "chest", "episodes": 100, "of": 100}
|
| 11 |
+
HB_AUG_SEED=0
|
| 12 |
+
{"event": "preflight", "augmentation": "hb-aug-v2-20261109", "samples": 64, "state_dim": 44, "body_dims": 29, "images_changed": 64, "body_values_moved": 1.0, "max_body_offset_deg": 2.7234, "actions_bit_identical": true, "non_body_state_bit_identical": true, "eval_items_deterministic": 8}
|
| 13 |
+
HB_INLOOP act installed: task a21 split train10, every 250 steps, cache checked on episodes [0, 11, 22, 33, 44, 55, 66, 77, 88, 99], code /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/eval-action-mse, G=<default>
|
| 14 |
+
{"event": "start", "policy": "act", "params": 83973836, "backbone_params": 11166912, "backbone_weights": "IMAGENET1K_V1", "backbone_norm": "frozen_bn", "train_frames": 86706, "steps": 4000, "from_step": 0, "cameras": ["ego_view", "chest"], "hw": [168, 224], "seed": 0}
|
| 15 |
+
{"event": "train", "step": 50, "lr": 2.5500000000000003e-05, "backbone_lr": 2.55e-06, "ema_decay": 0.947601, "it_s": 1.44, "data_frac": 0.426, "l1": 0.3968022525310516, "kl": 2.088510242700577, "loss": 21.281904726028444}
|
| 16 |
+
{"event": "train", "step": 100, "lr": 5.05e-05, "backbone_lr": 5.050000000000001e-06, "ema_decay": 0.968612, "it_s": 2.07, "data_frac": 0.375, "l1": 0.2077213028073311, "kl": 0.3668334889411926, "loss": 3.8760561990737914}
|
| 17 |
+
{"event": "train", "step": 150, "lr": 7.55e-05, "backbone_lr": 7.5500000000000006e-06, "ema_decay": 0.976785, "it_s": 2.73, "data_frac": 0.188, "l1": 0.16121079802513122, "kl": 0.24208551317453383, "loss": 2.582065906524658}
|
| 18 |
+
{"event": "train", "step": 200, "lr": 0.0001, "backbone_lr": 1e-05, "ema_decay": 0.981267, "it_s": 1.7, "data_frac": 0.493, "l1": 0.13353425040841102, "kl": 0.19816308379173278, "loss": 2.1151650977134704}
|
| 19 |
+
{"event": "train", "step": 250, "lr": 9.995728791936504e-05, "backbone_lr": 9.995728791936505e-06, "ema_decay": 0.984142, "it_s": 2.28, "data_frac": 0.321, "l1": 0.11580089271068573, "kl": 0.16498513221740724, "loss": 1.7656522178649903}
|
| 20 |
+
HB_INLOOP act ready: task a21 split train10 queries 539 (rank 0/1: 539), every 250 steps, batch 8, cams ['ego_view', 'chest']
|
| 21 |
+
HB_INLOOP act step 250: a21/train10 nMSE 0.1224 (motion_token 0.1346 hands 0.0576) on 539 queries, 8.8 s
|
| 22 |
+
{"event": "train", "step": 300, "lr": 9.98292246503335e-05, "backbone_lr": 9.98292246503335e-06, "ema_decay": 0.986162, "it_s": 2.11, "data_frac": 0.002, "l1": 0.10513943865895271, "kl": 0.13911894261837005, "loss": 1.4963288640975951}
|
| 23 |
+
{"event": "train", "step": 350, "lr": 9.961602898685226e-05, "backbone_lr": 9.961602898685225e-06, "ema_decay": 0.987668, "it_s": 1.62, "data_frac": 0.522, "l1": 0.09839520901441574, "kl": 0.11771051913499832, "loss": 1.2755004024505616}
|
| 24 |
+
{"event": "train", "step": 400, "lr": 9.931806517013612e-05, "backbone_lr": 9.931806517013612e-06, "ema_decay": 0.988841, "it_s": 2.91, "data_frac": 0.139, "l1": 0.09266761228442193, "kl": 0.09966142222285271, "loss": 1.0892818403244018}
|
| 25 |
+
{"event": "train", "step": 450, "lr": 9.893584226636772e-05, "backbone_lr": 9.893584226636773e-06, "ema_decay": 0.989782, "it_s": 2.3, "data_frac": 0.312, "l1": 0.08797679558396339, "kl": 0.08426792144775391, "loss": 0.930656008720398}
|
| 26 |
+
{"event": "train", "step": 500, "lr": 9.847001329696653e-05, "backbone_lr": 9.847001329696653e-06, "ema_decay": 0.990557, "it_s": 2.83, "data_frac": 0.16, "l1": 0.0841532824933529, "kl": 0.07075453773140908, "loss": 0.7916986525058747}
|
| 27 |
+
HB_INLOOP act step 500: a21/train10 nMSE 0.0785 (motion_token 0.0855 hands 0.0409) on 539 queries, 2.1 s
|
| 28 |
+
{"event": "train", "step": 550, "lr": 9.792137412291265e-05, "backbone_lr": 9.792137412291265e-06, "ema_decay": 0.991207, "it_s": 1.45, "data_frac": 0.501, "l1": 0.08082874715328217, "kl": 0.05934387616813183, "loss": 0.6742675054073334}
|
| 29 |
+
{"event": "train", "step": 600, "lr": 9.729086208503174e-05, "backbone_lr": 9.729086208503174e-06, "ema_decay": 0.991762, "it_s": 2.83, "data_frac": 0.158, "l1": 0.0778776378929615, "kl": 0.04958930015563965, "loss": 0.5737706398963929}
|
| 30 |
+
{"event": "train", "step": 650, "lr": 9.657955440256395e-05, "backbone_lr": 9.657955440256396e-06, "ema_decay": 0.992241, "it_s": 2.27, "data_frac": 0.329, "l1": 0.07585146456956864, "kl": 0.04162996657192707, "loss": 0.49215113282203676}
|
| 31 |
+
{"event": "train", "step": 700, "lr": 9.578866633275288e-05, "backbone_lr": 9.578866633275289e-06, "ema_decay": 0.99266, "it_s": 1.68, "data_frac": 0.503, "l1": 0.07305884331464768, "kl": 0.035459554716944695, "loss": 0.427654390335083}
|
| 32 |
+
{"event": "train", "step": 750, "lr": 9.491954909459895e-05, "backbone_lr": 9.491954909459895e-06, "ema_decay": 0.993029, "it_s": 2.38, "data_frac": 0.288, "l1": 0.07110772550106048, "kl": 0.030759527571499346, "loss": 0.37870300352573394}
|
| 33 |
+
HB_INLOOP act step 750: a21/train10 nMSE 0.0654 (motion_token 0.0714 hands 0.0338) on 539 queries, 2.6 s
|
| 34 |
+
{"event": "train", "step": 800, "lr": 9.397368756032445e-05, "backbone_lr": 9.397368756032445e-06, "ema_decay": 0.993358, "it_s": 2.73, "data_frac": 0.046, "l1": 0.0698948185145855, "kl": 0.026934910081326962, "loss": 0.33924392342567444}
|
| 35 |
+
{"event": "train", "step": 850, "lr": 9.295269771849427e-05, "backbone_lr": 9.295269771849426e-06, "ema_decay": 0.993653, "it_s": 1.5, "data_frac": 0.556, "l1": 0.06820781216025353, "kl": 0.02400007028132677, "loss": 0.3082085144519806}
|
| 36 |
+
{"event": "train", "step": 900, "lr": 9.185832391312644e-05, "backbone_lr": 9.185832391312644e-06, "ema_decay": 0.993919, "it_s": 2.79, "data_frac": 0.171, "l1": 0.06605794444680214, "kl": 0.02163953024893999, "loss": 0.282453248500824}
|
| 37 |
+
{"event": "train", "step": 950, "lr": 9.069243586350975e-05, "backbone_lr": 9.069243586350976e-06, "ema_decay": 0.994161, "it_s": 2.29, "data_frac": 0.319, "l1": 0.0646194252371788, "kl": 0.0198400841653347, "loss": 0.2630202668905258}
|
| 38 |
+
{"event": "train", "step": 1000, "lr": 8.945702546981969e-05, "backbone_lr": 8.94570254698197e-06, "ema_decay": 0.994381, "it_s": 2.78, "data_frac": 0.177, "l1": 0.06361747160553932, "kl": 0.01825438257306814, "loss": 0.2461612978577614}
|
| 39 |
+
HB_INLOOP act step 1000: a21/train10 nMSE 0.0536 (motion_token 0.0581 hands 0.0293) on 539 queries, 2.2 s
|
| 40 |
+
{"event": "train", "step": 1050, "lr": 8.815420340999033e-05, "backbone_lr": 8.815420340999034e-06, "ema_decay": 0.994583, "it_s": 1.47, "data_frac": 0.496, "l1": 0.06228475041687489, "kl": 0.016972091384232044, "loss": 0.23200566530227662}
|
| 41 |
+
{"event": "train", "step": 1100, "lr": 8.678619553365659e-05, "backbone_lr": 8.67861955336566e-06, "ema_decay": 0.994768, "it_s": 2.71, "data_frac": 0.197, "l1": 0.06135226778686047, "kl": 0.015743516962975265, "loss": 0.21878743708133697}
|
| 42 |
+
{"event": "train", "step": 1150, "lr": 8.535533905932738e-05, "backbone_lr": 8.535533905932739e-06, "ema_decay": 0.994939, "it_s": 2.32, "data_frac": 0.313, "l1": 0.06024975053966045, "kl": 0.014796174634248017, "loss": 0.2082114976644516}
|
| 43 |
+
{"event": "train", "step": 1200, "lr": 8.386407858128706e-05, "backbone_lr": 8.386407858128707e-06, "ema_decay": 0.995098, "it_s": 1.56, "data_frac": 0.538, "l1": 0.05954472191631794, "kl": 0.014018530566245318, "loss": 0.1997300273180008}
|
| 44 |
+
{"event": "train", "step": 1250, "lr": 8.231496189304704e-05, "backbone_lr": 8.231496189304704e-06, "ema_decay": 0.995246, "it_s": 2.53, "data_frac": 0.242, "l1": 0.058800191953778266, "kl": 0.013321163412183524, "loss": 0.1920118275284767}
|
| 45 |
+
HB_INLOOP act step 1250: a21/train10 nMSE 0.0446 (motion_token 0.0479 hands 0.0272) on 539 queries, 2.8 s
|
| 46 |
+
{"event": "train", "step": 1300, "lr": 8.07106356344834e-05, "backbone_lr": 8.071063563448341e-06, "ema_decay": 0.995384, "it_s": 2.73, "data_frac": 0.035, "l1": 0.058045262619853016, "kl": 0.012687942162156105, "loss": 0.18492468535900117}
|
| 47 |
+
{"event": "train", "step": 1350, "lr": 7.905384077009693e-05, "backbone_lr": 7.905384077009693e-06, "ema_decay": 0.995512, "it_s": 2.71, "data_frac": 0.199, "l1": 0.057435854971408844, "kl": 0.012082192450761794, "loss": 0.17825777977705}
|
| 48 |
+
{"event": "train", "step": 1400, "lr": 7.734740790612136e-05, "backbone_lr": 7.734740790612137e-06, "ema_decay": 0.995633, "it_s": 1.56, "data_frac": 0.535, "l1": 0.057052720338106155, "kl": 0.011635049823671579, "loss": 0.17340321868658065}
|
| 49 |
+
{"event": "train", "step": 1450, "lr": 7.559425245448006e-05, "backbone_lr": 7.559425245448006e-06, "ema_decay": 0.995746, "it_s": 2.29, "data_frac": 0.318, "l1": 0.05634188957512379, "kl": 0.011120456401258708, "loss": 0.16754645347595215}
|
| 50 |
+
{"event": "train", "step": 1500, "lr": 7.379736965185368e-05, "backbone_lr": 7.379736965185369e-06, "ema_decay": 0.995853, "it_s": 2.74, "data_frac": 0.189, "l1": 0.055899837613105775, "kl": 0.010643575582653284, "loss": 0.1623355942964554}
|
| 51 |
+
HB_INLOOP act step 1500: a21/train10 nMSE 0.0401 (motion_token 0.0426 hands 0.0265) on 539 queries, 2.2 s
|
| 52 |
+
{"event": "train", "step": 1550, "lr": 7.195982944236851e-05, "backbone_lr": 7.195982944236853e-06, "ema_decay": 0.995954, "it_s": 1.59, "data_frac": 0.458, "l1": 0.05561592675745487, "kl": 0.010344743132591247, "loss": 0.15906335800886154}
|
| 53 |
+
{"event": "train", "step": 1600, "lr": 7.008477123264848e-05, "backbone_lr": 7.008477123264849e-06, "ema_decay": 0.996049, "it_s": 2.35, "data_frac": 0.303, "l1": 0.05460803985595703, "kl": 0.009959328714758157, "loss": 0.15420132726430893}
|
| 54 |
+
{"event": "train", "step": 1650, "lr": 6.817539852819149e-05, "backbone_lr": 6.817539852819149e-06, "ema_decay": 0.996139, "it_s": 2.41, "data_frac": 0.285, "l1": 0.054419953003525735, "kl": 0.009682028107345104, "loss": 0.151240234375}
|
| 55 |
+
{"event": "train", "step": 1700, "lr": 6.623497346023418e-05, "backbone_lr": 6.6234973460234184e-06, "ema_decay": 0.996225, "it_s": 1.67, "data_frac": 0.507, "l1": 0.05405245065689087, "kl": 0.00939791126176715, "loss": 0.14803156226873398}
|
| 56 |
+
{"event": "train", "step": 1750, "lr": 6.426681121245527e-05, "backbone_lr": 6.426681121245527e-06, "ema_decay": 0.996306, "it_s": 2.68, "data_frac": 0.199, "l1": 0.0537038341909647, "kl": 0.009111070539802313, "loss": 0.1448145404458046}
|
| 57 |
+
HB_INLOOP act step 1750: a21/train10 nMSE 0.0372 (motion_token 0.0392 hands 0.0261) on 539 queries, 2.6 s
|
| 58 |
+
{"event": "train", "step": 1800, "lr": 6.227427435703997e-05, "backbone_lr": 6.227427435703997e-06, "ema_decay": 0.996383, "it_s": 2.35, "data_frac": 0.178, "l1": 0.05324124470353127, "kl": 0.008785570058971643, "loss": 0.14109694540500642}
|
| 59 |
+
{"event": "train", "step": 1850, "lr": 6.026076710978171e-05, "backbone_lr": 6.026076710978172e-06, "ema_decay": 0.996456, "it_s": 2.86, "data_frac": 0.157, "l1": 0.05301699161529541, "kl": 0.008602073211222886, "loss": 0.13903772264719008}
|
| 60 |
+
{"event": "train", "step": 1900, "lr": 5.8229729514036705e-05, "backbone_lr": 5.82297295140367e-06, "ema_decay": 0.996527, "it_s": 1.49, "data_frac": 0.56, "l1": 0.05278459519147873, "kl": 0.008340414315462112, "loss": 0.1361887377500534}
|
| 61 |
+
{"event": "train", "step": 1950, "lr": 5.618463156346739e-05, "backbone_lr": 5.61846315634674e-06, "ema_decay": 0.996594, "it_s": 2.74, "data_frac": 0.185, "l1": 0.05219915725290775, "kl": 0.00826421171426773, "loss": 0.13484127342700958}
|
| 62 |
+
{"event": "train", "step": 2000, "lr": 5.4128967273616625e-05, "backbone_lr": 5.412896727361663e-06, "ema_decay": 0.996658, "it_s": 2.35, "data_frac": 0.305, "l1": 0.052107051759958264, "kl": 0.008005329379811884, "loss": 0.13216034531593324}
|
| 63 |
+
HB_INLOOP act step 2000: a21/train10 nMSE 0.0353 (motion_token 0.0371 hands 0.0257) on 539 queries, 2.2 s
|
| 64 |
+
{"event": "save", "step": 2000, "checkpoint": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/act-runs/a21-b512-s4000/checkpoints/step-002000", "mse": 0.006051867268979549, "mse_row0": 0.005976332817226648, "mse_motion_token": 0.005685463547706604, "mse_inspire_left_hand_state": 0.002685042330995202, "mse_inspire_right_hand_state": 0.013327006250619888}
|
| 65 |
+
{"event": "train", "step": 2050, "lr": 5.2066248712440656e-05, "backbone_lr": 5.206624871244066e-06, "ema_decay": 0.996719, "it_s": 1.15, "data_frac": 0.333, "l1": 0.051546719148755075, "kl": 0.007852054964751005, "loss": 0.13006726861000062}
|
| 66 |
+
{"event": "train", "step": 2100, "lr": 5e-05, "backbone_lr": 5e-06, "ema_decay": 0.996778, "it_s": 2.29, "data_frac": 0.319, "l1": 0.05147263795137405, "kl": 0.007638444332405925, "loss": 0.12785708025097847}
|
| 67 |
+
{"event": "train", "step": 2150, "lr": 4.7933751287559335e-05, "backbone_lr": 4.793375128755934e-06, "ema_decay": 0.996834, "it_s": 2.83, "data_frac": 0.163, "l1": 0.051223594024777414, "kl": 0.007528608441352844, "loss": 0.1265096791088581}
|
| 68 |
+
{"event": "train", "step": 2200, "lr": 4.5871032726383386e-05, "backbone_lr": 4.587103272638339e-06, "ema_decay": 0.996888, "it_s": 1.49, "data_frac": 0.561, "l1": 0.050892451107501985, "kl": 0.007325104959309101, "loss": 0.12414350032806397}
|
| 69 |
+
{"event": "train", "step": 2250, "lr": 4.381536843653262e-05, "backbone_lr": 4.381536843653262e-06, "ema_decay": 0.99694, "it_s": 2.73, "data_frac": 0.186, "l1": 0.05077487863600254, "kl": 0.007204448217526078, "loss": 0.12281936034560204}
|
| 70 |
+
HB_INLOOP act step 2250: a21/train10 nMSE 0.0338 (motion_token 0.0354 hands 0.0254) on 539 queries, 2.6 s
|
| 71 |
+
{"event": "train", "step": 2300, "lr": 4.17702704859633e-05, "backbone_lr": 4.17702704859633e-06, "ema_decay": 0.99699, "it_s": 2.27, "data_frac": 0.191, "l1": 0.050330100059509275, "kl": 0.00707872505299747, "loss": 0.12111734941601754}
|
| 72 |
+
{"event": "train", "step": 2350, "lr": 3.973923289021829e-05, "backbone_lr": 3.973923289021829e-06, "ema_decay": 0.997038, "it_s": 2.98, "data_frac": 0.122, "l1": 0.05020686373114586, "kl": 0.006904948707669973, "loss": 0.1192563508450985}
|
| 73 |
+
{"event": "train", "step": 2400, "lr": 3.772572564296005e-05, "backbone_lr": 3.7725725642960047e-06, "ema_decay": 0.997085, "it_s": 1.51, "data_frac": 0.55, "l1": 0.04988115906715393, "kl": 0.006849255664274096, "loss": 0.11837371557950974}
|
| 74 |
+
{"event": "train", "step": 2450, "lr": 3.5733188787544745e-05, "backbone_lr": 3.573318878754475e-06, "ema_decay": 0.997129, "it_s": 2.78, "data_frac": 0.176, "l1": 0.04983138002455235, "kl": 0.0067032500077039, "loss": 0.11686388075351715}
|
| 75 |
+
{"event": "train", "step": 2500, "lr": 3.3765026539765834e-05, "backbone_lr": 3.3765026539765832e-06, "ema_decay": 0.997172, "it_s": 2.32, "data_frac": 0.311, "l1": 0.04964441485702992, "kl": 0.006678832313045859, "loss": 0.11643273770809173}
|
| 76 |
+
HB_INLOOP act step 2500: a21/train10 nMSE 0.0326 (motion_token 0.0340 hands 0.0250) on 539 queries, 2.2 s
|
| 77 |
+
{"event": "train", "step": 2550, "lr": 3.18246014718085e-05, "backbone_lr": 3.1824601471808504e-06, "ema_decay": 0.997214, "it_s": 1.6, "data_frac": 0.454, "l1": 0.04935580424964428, "kl": 0.006540680835023523, "loss": 0.11476261332631112}
|
| 78 |
+
{"event": "train", "step": 2600, "lr": 2.991522876735154e-05, "backbone_lr": 2.991522876735154e-06, "ema_decay": 0.997254, "it_s": 2.42, "data_frac": 0.281, "l1": 0.04909230045974255, "kl": 0.006444763066247106, "loss": 0.11353993117809295}
|
| 79 |
+
{"event": "train", "step": 2650, "lr": 2.804017055763149e-05, "backbone_lr": 2.804017055763149e-06, "ema_decay": 0.997293, "it_s": 2.64, "data_frac": 0.215, "l1": 0.04911118388175964, "kl": 0.00634563853032887, "loss": 0.11256757006049156}
|
| 80 |
+
{"event": "train", "step": 2700, "lr": 2.6202630348146324e-05, "backbone_lr": 2.6202630348146323e-06, "ema_decay": 0.997331, "it_s": 2.71, "data_frac": 0.202, "l1": 0.048948666974902154, "kl": 0.006302300859242677, "loss": 0.11197167605161668}
|
| 81 |
+
{"event": "train", "step": 2750, "lr": 2.4405747545519963e-05, "backbone_lr": 2.4405747545519966e-06, "ema_decay": 0.997367, "it_s": 1.52, "data_frac": 0.547, "l1": 0.048881325051188466, "kl": 0.006195313548669219, "loss": 0.11083446010947227}
|
| 82 |
+
HB_INLOOP act step 2750: a21/train10 nMSE 0.0314 (motion_token 0.0327 hands 0.0242) on 539 queries, 2.7 s
|
| 83 |
+
{"event": "train", "step": 2800, "lr": 2.2652592093878666e-05, "backbone_lr": 2.265259209387867e-06, "ema_decay": 0.997403, "it_s": 2.73, "data_frac": 0.043, "l1": 0.04866654008626938, "kl": 0.006153521668165922, "loss": 0.11020175620913505}
|
| 84 |
+
{"event": "train", "step": 2850, "lr": 2.094615922990309e-05, "backbone_lr": 2.094615922990309e-06, "ema_decay": 0.997437, "it_s": 2.34, "data_frac": 0.305, "l1": 0.048493663370609286, "kl": 0.006085742367431522, "loss": 0.10935108706355096}
|
| 85 |
+
{"event": "train", "step": 2900, "lr": 1.928936436551661e-05, "backbone_lr": 1.928936436551661e-06, "ema_decay": 0.99747, "it_s": 1.69, "data_frac": 0.499, "l1": 0.04820196144282818, "kl": 0.006055911164730787, "loss": 0.10876107364892959}
|
| 86 |
+
{"event": "train", "step": 2950, "lr": 1.768503810695295e-05, "backbone_lr": 1.7685038106952952e-06, "ema_decay": 0.997502, "it_s": 2.38, "data_frac": 0.293, "l1": 0.04815990790724754, "kl": 0.005970634315162897, "loss": 0.10786625117063522}
|
| 87 |
+
{"event": "train", "step": 3000, "lr": 1.6135921418712956e-05, "backbone_lr": 1.6135921418712959e-06, "ema_decay": 0.997534, "it_s": 2.77, "data_frac": 0.178, "l1": 0.048212554156780246, "kl": 0.005954807102680207, "loss": 0.10776062428951264}
|
| 88 |
+
HB_INLOOP act step 3000: a21/train10 nMSE 0.0304 (motion_token 0.0318 hands 0.0233) on 539 queries, 2.6 s
|
| 89 |
+
{"event": "train", "step": 3050, "lr": 1.4644660940672627e-05, "backbone_lr": 1.4644660940672628e-06, "ema_decay": 0.997564, "it_s": 1.51, "data_frac": 0.475, "l1": 0.047852448746562005, "kl": 0.005852315742522478, "loss": 0.10637560591101647}
|
| 90 |
+
{"event": "train", "step": 3100, "lr": 1.3213804466343421e-05, "backbone_lr": 1.321380446634342e-06, "ema_decay": 0.997594, "it_s": 2.76, "data_frac": 0.181, "l1": 0.047751505225896836, "kl": 0.005859570428729057, "loss": 0.1063472093641758}
|
| 91 |
+
{"event": "train", "step": 3150, "lr": 1.1845796590009683e-05, "backbone_lr": 1.1845796590009684e-06, "ema_decay": 0.997622, "it_s": 2.31, "data_frac": 0.312, "l1": 0.04784753859043121, "kl": 0.005770728867501021, "loss": 0.10555482685565948}
|
| 92 |
+
{"event": "train", "step": 3200, "lr": 1.0542974530180327e-05, "backbone_lr": 1.0542974530180327e-06, "ema_decay": 0.99765, "it_s": 2.82, "data_frac": 0.167, "l1": 0.04752532906830311, "kl": 0.005792053639888764, "loss": 0.1054458662867546}
|
| 93 |
+
{"event": "train", "step": 3250, "lr": 9.307564136490254e-06, "backbone_lr": 9.307564136490255e-07, "ema_decay": 0.997677, "it_s": 1.52, "data_frac": 0.551, "l1": 0.047517522051930425, "kl": 0.005759160704910755, "loss": 0.10510912969708443}
|
| 94 |
+
HB_INLOOP act step 3250: a21/train10 nMSE 0.0298 (motion_token 0.0311 hands 0.0226) on 539 queries, 2.6 s
|
| 95 |
+
{"event": "train", "step": 3300, "lr": 8.141676086873572e-06, "backbone_lr": 8.141676086873574e-07, "ema_decay": 0.997704, "it_s": 2.73, "data_frac": 0.049, "l1": 0.04743601031601429, "kl": 0.005794565714895725, "loss": 0.10538166731595994}
|
| 96 |
+
{"event": "train", "step": 3350, "lr": 7.047302281505736e-06, "backbone_lr": 7.047302281505735e-07, "ema_decay": 0.99773, "it_s": 2.37, "data_frac": 0.298, "l1": 0.047382500246167185, "kl": 0.005696006491780281, "loss": 0.10434256464242936}
|
| 97 |
+
{"event": "train", "step": 3400, "lr": 6.026312439675552e-06, "backbone_lr": 6.026312439675553e-07, "ema_decay": 0.997755, "it_s": 1.64, "data_frac": 0.514, "l1": 0.04736294478178024, "kl": 0.005688395863398909, "loss": 0.10424690321087837}
|
| 98 |
+
{"event": "train", "step": 3450, "lr": 5.080450905401057e-06, "backbone_lr": 5.080450905401057e-07, "ema_decay": 0.997779, "it_s": 2.38, "data_frac": 0.288, "l1": 0.047226805835962296, "kl": 0.005632433453574777, "loss": 0.10355114042758942}
|
| 99 |
+
{"event": "train", "step": 3500, "lr": 4.2113336672471245e-06, "backbone_lr": 4.211333667247125e-07, "ema_decay": 0.997803, "it_s": 2.71, "data_frac": 0.19, "l1": 0.047269053533673284, "kl": 0.005651054261252284, "loss": 0.10377959653735161}
|
| 100 |
+
HB_INLOOP act step 3500: a21/train10 nMSE 0.0293 (motion_token 0.0307 hands 0.0219) on 539 queries, 2.6 s
|
| 101 |
+
{"event": "train", "step": 3550, "lr": 3.420445597436056e-06, "backbone_lr": 3.420445597436056e-07, "ema_decay": 0.997826, "it_s": 1.52, "data_frac": 0.472, "l1": 0.047148799747228624, "kl": 0.0056399504002183675, "loss": 0.10354830414056777}
|
| 102 |
+
{"event": "train", "step": 3600, "lr": 2.7091379149682685e-06, "backbone_lr": 2.7091379149682683e-07, "ema_decay": 0.997849, "it_s": 2.72, "data_frac": 0.195, "l1": 0.04705870047211647, "kl": 0.005616703471168875, "loss": 0.10322573527693749}
|
| 103 |
+
{"event": "train", "step": 3650, "lr": 2.0786258770873647e-06, "backbone_lr": 2.0786258770873647e-07, "ema_decay": 0.997871, "it_s": 2.31, "data_frac": 0.314, "l1": 0.04720046691596508, "kl": 0.005609457707032561, "loss": 0.10329504430294037}
|
| 104 |
+
{"event": "train", "step": 3700, "lr": 1.5299867030334814e-06, "backbone_lr": 1.5299867030334815e-07, "ema_decay": 0.997893, "it_s": 2.76, "data_frac": 0.182, "l1": 0.04693737901747227, "kl": 0.005611669039353728, "loss": 0.10305406928062438}
|
| 105 |
+
{"event": "train", "step": 3750, "lr": 1.064157733632276e-06, "backbone_lr": 1.0641577336322761e-07, "ema_decay": 0.997914, "it_s": 1.67, "data_frac": 0.507, "l1": 0.047107405588030817, "kl": 0.005657419292256236, "loss": 0.10368159800767898}
|
| 106 |
+
HB_INLOOP act step 3750: a21/train10 nMSE 0.0290 (motion_token 0.0305 hands 0.0215) on 539 queries, 2.7 s
|
| 107 |
+
{"event": "train", "step": 3800, "lr": 6.819348298638839e-07, "backbone_lr": 6.819348298638839e-08, "ema_decay": 0.997934, "it_s": 2.33, "data_frac": 0.185, "l1": 0.04689669631421566, "kl": 0.005544909294694662, "loss": 0.10234578937292099}
|
| 108 |
+
{"event": "train", "step": 3850, "lr": 3.839710131477492e-07, "backbone_lr": 3.839710131477492e-08, "ema_decay": 0.997954, "it_s": 2.3, "data_frac": 0.32, "l1": 0.04712986469268799, "kl": 0.0056044575665146115, "loss": 0.10317444041371346}
|
| 109 |
+
{"event": "train", "step": 3900, "lr": 1.7077534966650766e-07, "backbone_lr": 1.7077534966650767e-08, "ema_decay": 0.997974, "it_s": 1.65, "data_frac": 0.515, "l1": 0.046865044087171556, "kl": 0.005515414224937558, "loss": 0.10201918572187424}
|
| 110 |
+
{"event": "train", "step": 3950, "lr": 4.2712080634949024e-08, "backbone_lr": 4.2712080634949024e-09, "ema_decay": 0.997993, "it_s": 2.77, "data_frac": 0.177, "l1": 0.046923773214221004, "kl": 0.0055825620424002406, "loss": 0.10274939388036727}
|
| 111 |
+
{"event": "train", "step": 4000, "lr": 0.0, "backbone_lr": 0.0, "ema_decay": 0.998012, "it_s": 2.28, "data_frac": 0.323, "l1": 0.04690054289996624, "kl": 0.005609055394306779, "loss": 0.10299109727144241}
|
| 112 |
+
HB_INLOOP act step 4000: a21/train10 nMSE 0.0288 (motion_token 0.0303 hands 0.0210) on 539 queries, 2.6 s
|
| 113 |
+
{"event": "save", "step": 4000, "checkpoint": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/act-runs/a21-b512-s4000/checkpoints/step-004000", "mse": 0.004579942673444748, "mse_row0": 0.005206524860113859, "mse_motion_token": 0.004571415483951569, "mse_inspire_left_hand_state": 0.0025285666342824697, "mse_inspire_right_hand_state": 0.006722284946590662}
|
| 114 |
+
{"event": "done", "step": 4000, "checkpoint": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/act-runs/a21-b512-s4000/checkpoints/final"}
|
a21-floor-basket-transfer/b512/step-004000/training_records/train_log.jsonl
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "train", "step": 50, "lr": 2.5500000000000003e-05, "backbone_lr": 2.55e-06, "ema_decay": 0.947601, "it_s": 1.44, "data_frac": 0.426, "l1": 0.3968022525310516, "kl": 2.088510242700577, "loss": 21.281904726028444}
|
| 2 |
+
{"event": "train", "step": 100, "lr": 5.05e-05, "backbone_lr": 5.050000000000001e-06, "ema_decay": 0.968612, "it_s": 2.07, "data_frac": 0.375, "l1": 0.2077213028073311, "kl": 0.3668334889411926, "loss": 3.8760561990737914}
|
| 3 |
+
{"event": "train", "step": 150, "lr": 7.55e-05, "backbone_lr": 7.5500000000000006e-06, "ema_decay": 0.976785, "it_s": 2.73, "data_frac": 0.188, "l1": 0.16121079802513122, "kl": 0.24208551317453383, "loss": 2.582065906524658}
|
| 4 |
+
{"event": "train", "step": 200, "lr": 0.0001, "backbone_lr": 1e-05, "ema_decay": 0.981267, "it_s": 1.7, "data_frac": 0.493, "l1": 0.13353425040841102, "kl": 0.19816308379173278, "loss": 2.1151650977134704}
|
| 5 |
+
{"event": "train", "step": 250, "lr": 9.995728791936504e-05, "backbone_lr": 9.995728791936505e-06, "ema_decay": 0.984142, "it_s": 2.28, "data_frac": 0.321, "l1": 0.11580089271068573, "kl": 0.16498513221740724, "loss": 1.7656522178649903}
|
| 6 |
+
{"event": "train", "step": 300, "lr": 9.98292246503335e-05, "backbone_lr": 9.98292246503335e-06, "ema_decay": 0.986162, "it_s": 2.11, "data_frac": 0.002, "l1": 0.10513943865895271, "kl": 0.13911894261837005, "loss": 1.4963288640975951}
|
| 7 |
+
{"event": "train", "step": 350, "lr": 9.961602898685226e-05, "backbone_lr": 9.961602898685225e-06, "ema_decay": 0.987668, "it_s": 1.62, "data_frac": 0.522, "l1": 0.09839520901441574, "kl": 0.11771051913499832, "loss": 1.2755004024505616}
|
| 8 |
+
{"event": "train", "step": 400, "lr": 9.931806517013612e-05, "backbone_lr": 9.931806517013612e-06, "ema_decay": 0.988841, "it_s": 2.91, "data_frac": 0.139, "l1": 0.09266761228442193, "kl": 0.09966142222285271, "loss": 1.0892818403244018}
|
| 9 |
+
{"event": "train", "step": 450, "lr": 9.893584226636772e-05, "backbone_lr": 9.893584226636773e-06, "ema_decay": 0.989782, "it_s": 2.3, "data_frac": 0.312, "l1": 0.08797679558396339, "kl": 0.08426792144775391, "loss": 0.930656008720398}
|
| 10 |
+
{"event": "train", "step": 500, "lr": 9.847001329696653e-05, "backbone_lr": 9.847001329696653e-06, "ema_decay": 0.990557, "it_s": 2.83, "data_frac": 0.16, "l1": 0.0841532824933529, "kl": 0.07075453773140908, "loss": 0.7916986525058747}
|
| 11 |
+
{"event": "train", "step": 550, "lr": 9.792137412291265e-05, "backbone_lr": 9.792137412291265e-06, "ema_decay": 0.991207, "it_s": 1.45, "data_frac": 0.501, "l1": 0.08082874715328217, "kl": 0.05934387616813183, "loss": 0.6742675054073334}
|
| 12 |
+
{"event": "train", "step": 600, "lr": 9.729086208503174e-05, "backbone_lr": 9.729086208503174e-06, "ema_decay": 0.991762, "it_s": 2.83, "data_frac": 0.158, "l1": 0.0778776378929615, "kl": 0.04958930015563965, "loss": 0.5737706398963929}
|
| 13 |
+
{"event": "train", "step": 650, "lr": 9.657955440256395e-05, "backbone_lr": 9.657955440256396e-06, "ema_decay": 0.992241, "it_s": 2.27, "data_frac": 0.329, "l1": 0.07585146456956864, "kl": 0.04162996657192707, "loss": 0.49215113282203676}
|
| 14 |
+
{"event": "train", "step": 700, "lr": 9.578866633275288e-05, "backbone_lr": 9.578866633275289e-06, "ema_decay": 0.99266, "it_s": 1.68, "data_frac": 0.503, "l1": 0.07305884331464768, "kl": 0.035459554716944695, "loss": 0.427654390335083}
|
| 15 |
+
{"event": "train", "step": 750, "lr": 9.491954909459895e-05, "backbone_lr": 9.491954909459895e-06, "ema_decay": 0.993029, "it_s": 2.38, "data_frac": 0.288, "l1": 0.07110772550106048, "kl": 0.030759527571499346, "loss": 0.37870300352573394}
|
| 16 |
+
{"event": "train", "step": 800, "lr": 9.397368756032445e-05, "backbone_lr": 9.397368756032445e-06, "ema_decay": 0.993358, "it_s": 2.73, "data_frac": 0.046, "l1": 0.0698948185145855, "kl": 0.026934910081326962, "loss": 0.33924392342567444}
|
| 17 |
+
{"event": "train", "step": 850, "lr": 9.295269771849427e-05, "backbone_lr": 9.295269771849426e-06, "ema_decay": 0.993653, "it_s": 1.5, "data_frac": 0.556, "l1": 0.06820781216025353, "kl": 0.02400007028132677, "loss": 0.3082085144519806}
|
| 18 |
+
{"event": "train", "step": 900, "lr": 9.185832391312644e-05, "backbone_lr": 9.185832391312644e-06, "ema_decay": 0.993919, "it_s": 2.79, "data_frac": 0.171, "l1": 0.06605794444680214, "kl": 0.02163953024893999, "loss": 0.282453248500824}
|
| 19 |
+
{"event": "train", "step": 950, "lr": 9.069243586350975e-05, "backbone_lr": 9.069243586350976e-06, "ema_decay": 0.994161, "it_s": 2.29, "data_frac": 0.319, "l1": 0.0646194252371788, "kl": 0.0198400841653347, "loss": 0.2630202668905258}
|
| 20 |
+
{"event": "train", "step": 1000, "lr": 8.945702546981969e-05, "backbone_lr": 8.94570254698197e-06, "ema_decay": 0.994381, "it_s": 2.78, "data_frac": 0.177, "l1": 0.06361747160553932, "kl": 0.01825438257306814, "loss": 0.2461612978577614}
|
| 21 |
+
{"event": "train", "step": 1050, "lr": 8.815420340999033e-05, "backbone_lr": 8.815420340999034e-06, "ema_decay": 0.994583, "it_s": 1.47, "data_frac": 0.496, "l1": 0.06228475041687489, "kl": 0.016972091384232044, "loss": 0.23200566530227662}
|
| 22 |
+
{"event": "train", "step": 1100, "lr": 8.678619553365659e-05, "backbone_lr": 8.67861955336566e-06, "ema_decay": 0.994768, "it_s": 2.71, "data_frac": 0.197, "l1": 0.06135226778686047, "kl": 0.015743516962975265, "loss": 0.21878743708133697}
|
| 23 |
+
{"event": "train", "step": 1150, "lr": 8.535533905932738e-05, "backbone_lr": 8.535533905932739e-06, "ema_decay": 0.994939, "it_s": 2.32, "data_frac": 0.313, "l1": 0.06024975053966045, "kl": 0.014796174634248017, "loss": 0.2082114976644516}
|
| 24 |
+
{"event": "train", "step": 1200, "lr": 8.386407858128706e-05, "backbone_lr": 8.386407858128707e-06, "ema_decay": 0.995098, "it_s": 1.56, "data_frac": 0.538, "l1": 0.05954472191631794, "kl": 0.014018530566245318, "loss": 0.1997300273180008}
|
| 25 |
+
{"event": "train", "step": 1250, "lr": 8.231496189304704e-05, "backbone_lr": 8.231496189304704e-06, "ema_decay": 0.995246, "it_s": 2.53, "data_frac": 0.242, "l1": 0.058800191953778266, "kl": 0.013321163412183524, "loss": 0.1920118275284767}
|
| 26 |
+
{"event": "train", "step": 1300, "lr": 8.07106356344834e-05, "backbone_lr": 8.071063563448341e-06, "ema_decay": 0.995384, "it_s": 2.73, "data_frac": 0.035, "l1": 0.058045262619853016, "kl": 0.012687942162156105, "loss": 0.18492468535900117}
|
| 27 |
+
{"event": "train", "step": 1350, "lr": 7.905384077009693e-05, "backbone_lr": 7.905384077009693e-06, "ema_decay": 0.995512, "it_s": 2.71, "data_frac": 0.199, "l1": 0.057435854971408844, "kl": 0.012082192450761794, "loss": 0.17825777977705}
|
| 28 |
+
{"event": "train", "step": 1400, "lr": 7.734740790612136e-05, "backbone_lr": 7.734740790612137e-06, "ema_decay": 0.995633, "it_s": 1.56, "data_frac": 0.535, "l1": 0.057052720338106155, "kl": 0.011635049823671579, "loss": 0.17340321868658065}
|
| 29 |
+
{"event": "train", "step": 1450, "lr": 7.559425245448006e-05, "backbone_lr": 7.559425245448006e-06, "ema_decay": 0.995746, "it_s": 2.29, "data_frac": 0.318, "l1": 0.05634188957512379, "kl": 0.011120456401258708, "loss": 0.16754645347595215}
|
| 30 |
+
{"event": "train", "step": 1500, "lr": 7.379736965185368e-05, "backbone_lr": 7.379736965185369e-06, "ema_decay": 0.995853, "it_s": 2.74, "data_frac": 0.189, "l1": 0.055899837613105775, "kl": 0.010643575582653284, "loss": 0.1623355942964554}
|
| 31 |
+
{"event": "train", "step": 1550, "lr": 7.195982944236851e-05, "backbone_lr": 7.195982944236853e-06, "ema_decay": 0.995954, "it_s": 1.59, "data_frac": 0.458, "l1": 0.05561592675745487, "kl": 0.010344743132591247, "loss": 0.15906335800886154}
|
| 32 |
+
{"event": "train", "step": 1600, "lr": 7.008477123264848e-05, "backbone_lr": 7.008477123264849e-06, "ema_decay": 0.996049, "it_s": 2.35, "data_frac": 0.303, "l1": 0.05460803985595703, "kl": 0.009959328714758157, "loss": 0.15420132726430893}
|
| 33 |
+
{"event": "train", "step": 1650, "lr": 6.817539852819149e-05, "backbone_lr": 6.817539852819149e-06, "ema_decay": 0.996139, "it_s": 2.41, "data_frac": 0.285, "l1": 0.054419953003525735, "kl": 0.009682028107345104, "loss": 0.151240234375}
|
| 34 |
+
{"event": "train", "step": 1700, "lr": 6.623497346023418e-05, "backbone_lr": 6.6234973460234184e-06, "ema_decay": 0.996225, "it_s": 1.67, "data_frac": 0.507, "l1": 0.05405245065689087, "kl": 0.00939791126176715, "loss": 0.14803156226873398}
|
| 35 |
+
{"event": "train", "step": 1750, "lr": 6.426681121245527e-05, "backbone_lr": 6.426681121245527e-06, "ema_decay": 0.996306, "it_s": 2.68, "data_frac": 0.199, "l1": 0.0537038341909647, "kl": 0.009111070539802313, "loss": 0.1448145404458046}
|
| 36 |
+
{"event": "train", "step": 1800, "lr": 6.227427435703997e-05, "backbone_lr": 6.227427435703997e-06, "ema_decay": 0.996383, "it_s": 2.35, "data_frac": 0.178, "l1": 0.05324124470353127, "kl": 0.008785570058971643, "loss": 0.14109694540500642}
|
| 37 |
+
{"event": "train", "step": 1850, "lr": 6.026076710978171e-05, "backbone_lr": 6.026076710978172e-06, "ema_decay": 0.996456, "it_s": 2.86, "data_frac": 0.157, "l1": 0.05301699161529541, "kl": 0.008602073211222886, "loss": 0.13903772264719008}
|
| 38 |
+
{"event": "train", "step": 1900, "lr": 5.8229729514036705e-05, "backbone_lr": 5.82297295140367e-06, "ema_decay": 0.996527, "it_s": 1.49, "data_frac": 0.56, "l1": 0.05278459519147873, "kl": 0.008340414315462112, "loss": 0.1361887377500534}
|
| 39 |
+
{"event": "train", "step": 1950, "lr": 5.618463156346739e-05, "backbone_lr": 5.61846315634674e-06, "ema_decay": 0.996594, "it_s": 2.74, "data_frac": 0.185, "l1": 0.05219915725290775, "kl": 0.00826421171426773, "loss": 0.13484127342700958}
|
| 40 |
+
{"event": "train", "step": 2000, "lr": 5.4128967273616625e-05, "backbone_lr": 5.412896727361663e-06, "ema_decay": 0.996658, "it_s": 2.35, "data_frac": 0.305, "l1": 0.052107051759958264, "kl": 0.008005329379811884, "loss": 0.13216034531593324}
|
| 41 |
+
{"event": "save", "step": 2000, "checkpoint": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/act-runs/a21-b512-s4000/checkpoints/step-002000", "mse": 0.006051867268979549, "mse_row0": 0.005976332817226648, "mse_motion_token": 0.005685463547706604, "mse_inspire_left_hand_state": 0.002685042330995202, "mse_inspire_right_hand_state": 0.013327006250619888}
|
| 42 |
+
{"event": "train", "step": 2050, "lr": 5.2066248712440656e-05, "backbone_lr": 5.206624871244066e-06, "ema_decay": 0.996719, "it_s": 1.15, "data_frac": 0.333, "l1": 0.051546719148755075, "kl": 0.007852054964751005, "loss": 0.13006726861000062}
|
| 43 |
+
{"event": "train", "step": 2100, "lr": 5e-05, "backbone_lr": 5e-06, "ema_decay": 0.996778, "it_s": 2.29, "data_frac": 0.319, "l1": 0.05147263795137405, "kl": 0.007638444332405925, "loss": 0.12785708025097847}
|
| 44 |
+
{"event": "train", "step": 2150, "lr": 4.7933751287559335e-05, "backbone_lr": 4.793375128755934e-06, "ema_decay": 0.996834, "it_s": 2.83, "data_frac": 0.163, "l1": 0.051223594024777414, "kl": 0.007528608441352844, "loss": 0.1265096791088581}
|
| 45 |
+
{"event": "train", "step": 2200, "lr": 4.5871032726383386e-05, "backbone_lr": 4.587103272638339e-06, "ema_decay": 0.996888, "it_s": 1.49, "data_frac": 0.561, "l1": 0.050892451107501985, "kl": 0.007325104959309101, "loss": 0.12414350032806397}
|
| 46 |
+
{"event": "train", "step": 2250, "lr": 4.381536843653262e-05, "backbone_lr": 4.381536843653262e-06, "ema_decay": 0.99694, "it_s": 2.73, "data_frac": 0.186, "l1": 0.05077487863600254, "kl": 0.007204448217526078, "loss": 0.12281936034560204}
|
| 47 |
+
{"event": "train", "step": 2300, "lr": 4.17702704859633e-05, "backbone_lr": 4.17702704859633e-06, "ema_decay": 0.99699, "it_s": 2.27, "data_frac": 0.191, "l1": 0.050330100059509275, "kl": 0.00707872505299747, "loss": 0.12111734941601754}
|
| 48 |
+
{"event": "train", "step": 2350, "lr": 3.973923289021829e-05, "backbone_lr": 3.973923289021829e-06, "ema_decay": 0.997038, "it_s": 2.98, "data_frac": 0.122, "l1": 0.05020686373114586, "kl": 0.006904948707669973, "loss": 0.1192563508450985}
|
| 49 |
+
{"event": "train", "step": 2400, "lr": 3.772572564296005e-05, "backbone_lr": 3.7725725642960047e-06, "ema_decay": 0.997085, "it_s": 1.51, "data_frac": 0.55, "l1": 0.04988115906715393, "kl": 0.006849255664274096, "loss": 0.11837371557950974}
|
| 50 |
+
{"event": "train", "step": 2450, "lr": 3.5733188787544745e-05, "backbone_lr": 3.573318878754475e-06, "ema_decay": 0.997129, "it_s": 2.78, "data_frac": 0.176, "l1": 0.04983138002455235, "kl": 0.0067032500077039, "loss": 0.11686388075351715}
|
| 51 |
+
{"event": "train", "step": 2500, "lr": 3.3765026539765834e-05, "backbone_lr": 3.3765026539765832e-06, "ema_decay": 0.997172, "it_s": 2.32, "data_frac": 0.311, "l1": 0.04964441485702992, "kl": 0.006678832313045859, "loss": 0.11643273770809173}
|
| 52 |
+
{"event": "train", "step": 2550, "lr": 3.18246014718085e-05, "backbone_lr": 3.1824601471808504e-06, "ema_decay": 0.997214, "it_s": 1.6, "data_frac": 0.454, "l1": 0.04935580424964428, "kl": 0.006540680835023523, "loss": 0.11476261332631112}
|
| 53 |
+
{"event": "train", "step": 2600, "lr": 2.991522876735154e-05, "backbone_lr": 2.991522876735154e-06, "ema_decay": 0.997254, "it_s": 2.42, "data_frac": 0.281, "l1": 0.04909230045974255, "kl": 0.006444763066247106, "loss": 0.11353993117809295}
|
| 54 |
+
{"event": "train", "step": 2650, "lr": 2.804017055763149e-05, "backbone_lr": 2.804017055763149e-06, "ema_decay": 0.997293, "it_s": 2.64, "data_frac": 0.215, "l1": 0.04911118388175964, "kl": 0.00634563853032887, "loss": 0.11256757006049156}
|
| 55 |
+
{"event": "train", "step": 2700, "lr": 2.6202630348146324e-05, "backbone_lr": 2.6202630348146323e-06, "ema_decay": 0.997331, "it_s": 2.71, "data_frac": 0.202, "l1": 0.048948666974902154, "kl": 0.006302300859242677, "loss": 0.11197167605161668}
|
| 56 |
+
{"event": "train", "step": 2750, "lr": 2.4405747545519963e-05, "backbone_lr": 2.4405747545519966e-06, "ema_decay": 0.997367, "it_s": 1.52, "data_frac": 0.547, "l1": 0.048881325051188466, "kl": 0.006195313548669219, "loss": 0.11083446010947227}
|
| 57 |
+
{"event": "train", "step": 2800, "lr": 2.2652592093878666e-05, "backbone_lr": 2.265259209387867e-06, "ema_decay": 0.997403, "it_s": 2.73, "data_frac": 0.043, "l1": 0.04866654008626938, "kl": 0.006153521668165922, "loss": 0.11020175620913505}
|
| 58 |
+
{"event": "train", "step": 2850, "lr": 2.094615922990309e-05, "backbone_lr": 2.094615922990309e-06, "ema_decay": 0.997437, "it_s": 2.34, "data_frac": 0.305, "l1": 0.048493663370609286, "kl": 0.006085742367431522, "loss": 0.10935108706355096}
|
| 59 |
+
{"event": "train", "step": 2900, "lr": 1.928936436551661e-05, "backbone_lr": 1.928936436551661e-06, "ema_decay": 0.99747, "it_s": 1.69, "data_frac": 0.499, "l1": 0.04820196144282818, "kl": 0.006055911164730787, "loss": 0.10876107364892959}
|
| 60 |
+
{"event": "train", "step": 2950, "lr": 1.768503810695295e-05, "backbone_lr": 1.7685038106952952e-06, "ema_decay": 0.997502, "it_s": 2.38, "data_frac": 0.293, "l1": 0.04815990790724754, "kl": 0.005970634315162897, "loss": 0.10786625117063522}
|
| 61 |
+
{"event": "train", "step": 3000, "lr": 1.6135921418712956e-05, "backbone_lr": 1.6135921418712959e-06, "ema_decay": 0.997534, "it_s": 2.77, "data_frac": 0.178, "l1": 0.048212554156780246, "kl": 0.005954807102680207, "loss": 0.10776062428951264}
|
| 62 |
+
{"event": "train", "step": 3050, "lr": 1.4644660940672627e-05, "backbone_lr": 1.4644660940672628e-06, "ema_decay": 0.997564, "it_s": 1.51, "data_frac": 0.475, "l1": 0.047852448746562005, "kl": 0.005852315742522478, "loss": 0.10637560591101647}
|
| 63 |
+
{"event": "train", "step": 3100, "lr": 1.3213804466343421e-05, "backbone_lr": 1.321380446634342e-06, "ema_decay": 0.997594, "it_s": 2.76, "data_frac": 0.181, "l1": 0.047751505225896836, "kl": 0.005859570428729057, "loss": 0.1063472093641758}
|
| 64 |
+
{"event": "train", "step": 3150, "lr": 1.1845796590009683e-05, "backbone_lr": 1.1845796590009684e-06, "ema_decay": 0.997622, "it_s": 2.31, "data_frac": 0.312, "l1": 0.04784753859043121, "kl": 0.005770728867501021, "loss": 0.10555482685565948}
|
| 65 |
+
{"event": "train", "step": 3200, "lr": 1.0542974530180327e-05, "backbone_lr": 1.0542974530180327e-06, "ema_decay": 0.99765, "it_s": 2.82, "data_frac": 0.167, "l1": 0.04752532906830311, "kl": 0.005792053639888764, "loss": 0.1054458662867546}
|
| 66 |
+
{"event": "train", "step": 3250, "lr": 9.307564136490254e-06, "backbone_lr": 9.307564136490255e-07, "ema_decay": 0.997677, "it_s": 1.52, "data_frac": 0.551, "l1": 0.047517522051930425, "kl": 0.005759160704910755, "loss": 0.10510912969708443}
|
| 67 |
+
{"event": "train", "step": 3300, "lr": 8.141676086873572e-06, "backbone_lr": 8.141676086873574e-07, "ema_decay": 0.997704, "it_s": 2.73, "data_frac": 0.049, "l1": 0.04743601031601429, "kl": 0.005794565714895725, "loss": 0.10538166731595994}
|
| 68 |
+
{"event": "train", "step": 3350, "lr": 7.047302281505736e-06, "backbone_lr": 7.047302281505735e-07, "ema_decay": 0.99773, "it_s": 2.37, "data_frac": 0.298, "l1": 0.047382500246167185, "kl": 0.005696006491780281, "loss": 0.10434256464242936}
|
| 69 |
+
{"event": "train", "step": 3400, "lr": 6.026312439675552e-06, "backbone_lr": 6.026312439675553e-07, "ema_decay": 0.997755, "it_s": 1.64, "data_frac": 0.514, "l1": 0.04736294478178024, "kl": 0.005688395863398909, "loss": 0.10424690321087837}
|
| 70 |
+
{"event": "train", "step": 3450, "lr": 5.080450905401057e-06, "backbone_lr": 5.080450905401057e-07, "ema_decay": 0.997779, "it_s": 2.38, "data_frac": 0.288, "l1": 0.047226805835962296, "kl": 0.005632433453574777, "loss": 0.10355114042758942}
|
| 71 |
+
{"event": "train", "step": 3500, "lr": 4.2113336672471245e-06, "backbone_lr": 4.211333667247125e-07, "ema_decay": 0.997803, "it_s": 2.71, "data_frac": 0.19, "l1": 0.047269053533673284, "kl": 0.005651054261252284, "loss": 0.10377959653735161}
|
| 72 |
+
{"event": "train", "step": 3550, "lr": 3.420445597436056e-06, "backbone_lr": 3.420445597436056e-07, "ema_decay": 0.997826, "it_s": 1.52, "data_frac": 0.472, "l1": 0.047148799747228624, "kl": 0.0056399504002183675, "loss": 0.10354830414056777}
|
| 73 |
+
{"event": "train", "step": 3600, "lr": 2.7091379149682685e-06, "backbone_lr": 2.7091379149682683e-07, "ema_decay": 0.997849, "it_s": 2.72, "data_frac": 0.195, "l1": 0.04705870047211647, "kl": 0.005616703471168875, "loss": 0.10322573527693749}
|
| 74 |
+
{"event": "train", "step": 3650, "lr": 2.0786258770873647e-06, "backbone_lr": 2.0786258770873647e-07, "ema_decay": 0.997871, "it_s": 2.31, "data_frac": 0.314, "l1": 0.04720046691596508, "kl": 0.005609457707032561, "loss": 0.10329504430294037}
|
| 75 |
+
{"event": "train", "step": 3700, "lr": 1.5299867030334814e-06, "backbone_lr": 1.5299867030334815e-07, "ema_decay": 0.997893, "it_s": 2.76, "data_frac": 0.182, "l1": 0.04693737901747227, "kl": 0.005611669039353728, "loss": 0.10305406928062438}
|
| 76 |
+
{"event": "train", "step": 3750, "lr": 1.064157733632276e-06, "backbone_lr": 1.0641577336322761e-07, "ema_decay": 0.997914, "it_s": 1.67, "data_frac": 0.507, "l1": 0.047107405588030817, "kl": 0.005657419292256236, "loss": 0.10368159800767898}
|
| 77 |
+
{"event": "train", "step": 3800, "lr": 6.819348298638839e-07, "backbone_lr": 6.819348298638839e-08, "ema_decay": 0.997934, "it_s": 2.33, "data_frac": 0.185, "l1": 0.04689669631421566, "kl": 0.005544909294694662, "loss": 0.10234578937292099}
|
| 78 |
+
{"event": "train", "step": 3850, "lr": 3.839710131477492e-07, "backbone_lr": 3.839710131477492e-08, "ema_decay": 0.997954, "it_s": 2.3, "data_frac": 0.32, "l1": 0.04712986469268799, "kl": 0.0056044575665146115, "loss": 0.10317444041371346}
|
| 79 |
+
{"event": "train", "step": 3900, "lr": 1.7077534966650766e-07, "backbone_lr": 1.7077534966650767e-08, "ema_decay": 0.997974, "it_s": 1.65, "data_frac": 0.515, "l1": 0.046865044087171556, "kl": 0.005515414224937558, "loss": 0.10201918572187424}
|
| 80 |
+
{"event": "train", "step": 3950, "lr": 4.2712080634949024e-08, "backbone_lr": 4.2712080634949024e-09, "ema_decay": 0.997993, "it_s": 2.77, "data_frac": 0.177, "l1": 0.046923773214221004, "kl": 0.0055825620424002406, "loss": 0.10274939388036727}
|
| 81 |
+
{"event": "train", "step": 4000, "lr": 0.0, "backbone_lr": 0.0, "ema_decay": 0.998012, "it_s": 2.28, "data_frac": 0.323, "l1": 0.04690054289996624, "kl": 0.005609055394306779, "loss": 0.10299109727144241}
|
| 82 |
+
{"event": "save", "step": 4000, "checkpoint": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/act-runs/a21-b512-s4000/checkpoints/step-004000", "mse": 0.004579942673444748, "mse_row0": 0.005206524860113859, "mse_motion_token": 0.004571415483951569, "mse_inspire_left_hand_state": 0.0025285666342824697, "mse_inspire_right_hand_state": 0.006722284946590662}
|