lsnu commited on
Commit
0b9a0fd
·
verified ·
1 Parent(s): 3bee1c7

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -384
README.md DELETED
@@ -1,384 +0,0 @@
1
- # PERSIST-VLA-Tri fast build and test handoff for LCC
2
-
3
- ## 1. Purpose
4
-
5
- This handoff is optimized for one thing: decide quickly whether the tri-branch persistence head is worth further work before spending time on Dobot data collection or high-fidelity simulation.
6
-
7
- The immediate target is not SOTA. The target is to establish that the architecture is technically sound, trains stably, does not collapse the transfer branch, and stays in the same rough performance ballpark as the slim baselines and ablations used in this stage.
8
-
9
- This plan deliberately avoids Isaac Sim, large VLA finetuning, and any heavyweight external benchmark until the current structure clears a small set of internal gates.
10
-
11
- ## 2. What is in scope right now
12
-
13
- Use the current reference repo only.
14
-
15
- Run the existing unit tests.
16
-
17
- Run a very short synthetic training loop.
18
-
19
- Run a held-out evaluation with a single script that emits the metrics you actually need to make a go/no-go decision.
20
-
21
- Run a tiny sweep over seeds and sequence horizon.
22
-
23
- Use oracle-based ablations to answer whether transfer is even worth modeling in the current proxy.
24
-
25
- Do **not** start OpenVLA, OFT, Isaac, or DeformableRavens until the internal gates in Section 8 pass.
26
-
27
- ## 3. Current reality of the attached architecture
28
-
29
- The current code base is usable as a research reference implementation. The important facts for the first iteration cycle are simple.
30
-
31
- The model and tests run.
32
-
33
- The synthetic environment already contains the three mechanics classes (`foliage`, `bag`, `cloth`) and the three persistence branches (`hold`, `transfer`, `release`).
34
-
35
- The known weak point is not general instability. The weak point is branch behavior. In particular, `transfer` is the branch that matters scientifically, and it is also the one most likely to collapse unless the training signal is strong enough. `release` is still sparse, so the first week should be treated as a **hold-vs-transfer** debugging cycle, with `release` kept in the structure but not treated as a hard success criterion.
36
-
37
- ## 4. Minimal file layout on cluster
38
-
39
- Use a directory layout like this so logs and scripts do not get mixed into the repo.
40
-
41
- ```text
42
- $WORKDIR/
43
- persist_vla_reference/ # unzipped reference repo
44
- persist_vla_lcc_handoff/ # this handoff bundle
45
- runs/
46
- smoke/
47
- quick/
48
- seq/
49
- sweep/
50
- logs/
51
- ```
52
-
53
- ## 5. Minimal software requirements
54
-
55
- For the current synthetic stack, the dependency surface is very small.
56
-
57
- You need Python, PyTorch, and pytest.
58
-
59
- You do **not** need Isaac Sim.
60
-
61
- You do **not** need MuJoCo.
62
-
63
- You do **not** need any Dobot SDK.
64
-
65
- If your cluster environment already has a PyTorch module or conda env, use that. Do not spend time building a custom environment unless the default one fails.
66
-
67
- A minimal check is:
68
-
69
- ```bash
70
- python - <<'PY'
71
- import torch, pytest
72
- print('torch', torch.__version__)
73
- print('cuda', torch.cuda.is_available())
74
- PY
75
- ```
76
-
77
- If that works, move on.
78
-
79
- ## 6. Fastest possible build sequence
80
-
81
- ### 6.1. Copy files to the node or shared storage
82
-
83
- Unzip the architecture repo into `persist_vla_reference/`.
84
-
85
- Copy this handoff bundle next to it as `persist_vla_lcc_handoff/`.
86
-
87
- ### 6.2. First interactive smoke pass
88
-
89
- Do the first run interactively, not through a long SLURM batch chain. The point is to fail fast.
90
-
91
- ```bash
92
- cd $WORKDIR/persist_vla_reference
93
- python -m pytest -q
94
- python scripts/demo_inference.py
95
- python $WORKDIR/persist_vla_lcc_handoff/quick_eval_tri.py \
96
- --repo $WORKDIR/persist_vla_reference \
97
- --device cpu \
98
- --steps 20 \
99
- --batch-size 8 \
100
- --eval-batch-size 32 \
101
- --hidden-dim 24 \
102
- --output-json $WORKDIR/runs/smoke/smoke_eval.json
103
- ```
104
-
105
- Expected result.
106
-
107
- `pytest` should pass.
108
-
109
- `demo_inference.py` should print branch and phase information without error.
110
-
111
- `quick_eval_tri.py` should emit a JSON file with training trace and held-out metrics.
112
-
113
- If this fails, do not queue anything else.
114
-
115
- ### 6.3. First GPU-backed quick run
116
-
117
- Once the smoke pass works, switch to one GPU and run the smallest meaningful experiment.
118
-
119
- ```bash
120
- python $WORKDIR/persist_vla_lcc_handoff/quick_eval_tri.py \
121
- --repo $WORKDIR/persist_vla_reference \
122
- --device cuda \
123
- --steps 80 \
124
- --batch-size 24 \
125
- --eval-batch-size 256 \
126
- --hidden-dim 48 \
127
- --sequence-horizon 1 \
128
- --output-json $WORKDIR/runs/quick/base_s80_h48_seed0.json
129
- ```
130
-
131
- This is the default quick sanity run. It should finish fast enough that queue time matters more than compute time.
132
-
133
- ## 7. Exactly what to run in week 1
134
-
135
- Run the following in order. Do not expand the matrix until the previous row is green.
136
-
137
- ### Stage A. Smoke and basic training
138
-
139
- Run one smoke pass.
140
-
141
- Run one quick GPU pass with `sequence_horizon=1`.
142
-
143
- Run one quick GPU pass with `sequence_horizon=3`.
144
-
145
- Commands:
146
-
147
- ```bash
148
- python $WORKDIR/persist_vla_lcc_handoff/quick_eval_tri.py \
149
- --repo $WORKDIR/persist_vla_reference \
150
- --device cuda \
151
- --steps 80 \
152
- --batch-size 24 \
153
- --eval-batch-size 256 \
154
- --hidden-dim 48 \
155
- --sequence-horizon 1 \
156
- --seed 0 \
157
- --output-json $WORKDIR/runs/quick/base_s80_seq1_seed0.json
158
-
159
- python $WORKDIR/persist_vla_lcc_handoff/quick_eval_tri.py \
160
- --repo $WORKDIR/persist_vla_reference \
161
- --device cuda \
162
- --steps 80 \
163
- --batch-size 24 \
164
- --eval-batch-size 256 \
165
- --hidden-dim 48 \
166
- --sequence-horizon 3 \
167
- --seed 0 \
168
- --output-json $WORKDIR/runs/seq/base_s80_seq3_seed0.json
169
- ```
170
-
171
- ### Stage B. Small seed sweep
172
-
173
- If Stage A works, run three seeds for the two settings above.
174
-
175
- That means six total jobs.
176
-
177
- Use seeds `0 1 2`.
178
-
179
- Keep everything else fixed.
180
-
181
- Do **not** change more than one variable at a time.
182
-
183
- ### Stage C. Slightly longer run only if Stage B is promising
184
-
185
- If Stage B does not collapse, run one longer pass.
186
-
187
- ```bash
188
- python $WORKDIR/persist_vla_lcc_handoff/quick_eval_tri.py \
189
- --repo $WORKDIR/persist_vla_reference \
190
- --device cuda \
191
- --steps 200 \
192
- --batch-size 32 \
193
- --eval-batch-size 512 \
194
- --hidden-dim 64 \
195
- --sequence-horizon 3 \
196
- --seed 0 \
197
- --output-json $WORKDIR/runs/seq/base_s200_seq3_h64_seed0.json
198
- ```
199
-
200
- This is still a slim run. It is only meant to answer whether the transfer branch starts behaving better with a slightly stronger setting.
201
-
202
- ## 8. Metrics that matter and the pass/fail gates
203
-
204
- The JSON emitted by `quick_eval_tri.py` contains more than you need. Focus on the following fields.
205
-
206
- `oracle_transfer_state_fraction`
207
-
208
- This is the fraction of held-out labels where the synthetic oracle says `transfer` is the right persistence mode. This is a property of the proxy task distribution, not of the trained model. If this is too low, your synthetic proxy is not exercising the contribution you care about.
209
-
210
- `transfer_fraction_foliage`, `transfer_fraction_bag`, `transfer_fraction_cloth`
211
-
212
- These should preserve the intended inductive bias. Bag and cloth should not look less transfer-heavy than foliage.
213
-
214
- `oracle_transfer_branch_gain_transfer_states`
215
-
216
- This is the oracle gain from allowing the transfer branch instead of forcing only hold/release, but measured only on transfer-labeled held-out states. If this is near zero, the architectural contribution has no room to pay off in the current proxy, no matter how well you train.
217
-
218
- `oracle_transfer_template_gain_transfer_states`
219
-
220
- This isolates whether the explicit transfer template in the candidate library matters.
221
-
222
- `oracle_approx_ratio_of_model_choice`
223
-
224
- This is the teacher utility of the model-selected candidate divided by the oracle-best candidate utility (using means, not unstable per-sample ratios). This is the best single number for the current stage. It tells you whether the model is choosing candidate chunks close to oracle best.
225
-
226
- `mode_transfer_recall_vs_oracle`
227
-
228
- This is the recall of the model's selected transfer branch for the decoded mode chunk, relative to the oracle-best branch for that same chunk. This is the direct branch-collapse detector.
229
-
230
- Use these gates.
231
-
232
- ### Gate 1. Proxy sanity
233
-
234
- Pass if:
235
-
236
- ```text
237
- oracle_transfer_state_fraction >= 0.10
238
- transfer_fraction_bag > transfer_fraction_foliage
239
- transfer_fraction_cloth > transfer_fraction_foliage
240
- oracle_transfer_branch_gain_transfer_states >= 0.02
241
- oracle_transfer_template_gain_transfer_states >= 0.01
242
- ```
243
-
244
- Fail action: if Gate 1 fails, do not touch the model first. Fix the synthetic proxy or the oracle coefficients. The environment is not rewarding transfer strongly enough.
245
-
246
- ### Gate 2. Candidate selection quality
247
-
248
- Pass if the median across the three-seed quick sweep satisfies:
249
-
250
- ```text
251
- oracle_approx_ratio_of_model_choice >= 0.95
252
- ```
253
-
254
- Interpretation: even if branch labels are imperfect, the model is still choosing candidate chunks close to oracle-best.
255
-
256
- ### Gate 3. Branch collapse check
257
-
258
- Pass if the median across the three-seed quick sweep satisfies:
259
-
260
- ```text
261
- mode_transfer_recall_vs_oracle > 0.10
262
- ```
263
-
264
- This threshold is intentionally low for week 1. The goal is only to prove that transfer does not stay dead.
265
-
266
- For the longer run (`steps=200`, `sequence_horizon=3`), the preferred target is:
267
-
268
- ```text
269
- mode_transfer_recall_vs_oracle >= 0.25
270
- ```
271
-
272
- ### Gate 4. Stability
273
-
274
- Pass if:
275
-
276
- `eval_total_loss` is not exploding.
277
-
278
- The training trace shows an early drop in `total` and the world losses remain finite.
279
-
280
- `branch_prior` and `branch_choice` are not diverging upward late in training.
281
-
282
- ## 9. What to do when a run fails
283
-
284
- Use this order. Do not change everything at once.
285
-
286
- ### Failure type A. Transfer recall stays at zero
287
-
288
- This is the most important failure mode.
289
-
290
- First, rerun with `sequence_horizon=3`. If transfer is temporal, horizon 1 is too weak.
291
-
292
- Second, increase the transfer emphasis in `PersistVLAConfig.branch_loss_weights`. The current default is `(1.0, 4.0, 3.0)`. Move only the transfer weight first, for example to `(1.0, 6.0, 3.0)`.
293
-
294
- Third, reduce `branch_prior_scale` slightly if the planner prior is overpowering branch-specific evidence. A first test is `0.15 -> 0.05`.
295
-
296
- Fourth, oversample transfer-heavy states in the synthetic dataset. Do this in the sampler, not by post-hoc filtering during training.
297
-
298
- Do **not** spend time on `release` yet.
299
-
300
- ### Failure type B. Oracle gains for transfer are too small
301
-
302
- Do not blame the learner. This means the proxy itself is too weak.
303
-
304
- Increase transfer-support dynamics for `bag` and `cloth` in the synthetic oracle before changing the network.
305
-
306
- You need the proxy to make transfer genuinely useful.
307
-
308
- ### Failure type C. Candidate choice ratio is weak but transfer recall is nonzero
309
-
310
- This means the branch head may be waking up, but the candidate set is not good enough.
311
-
312
- Before adding a larger backbone, improve the candidate library.
313
-
314
- The first low-cost changes are:
315
-
316
- increase `num_candidates` from 6 to 8,
317
-
318
- add one more transfer-flavored structured template,
319
-
320
- or make the existing transfer template less similar to the hold template.
321
-
322
- ### Failure type D. Release never appears
323
-
324
- Ignore it for the first week.
325
-
326
- Treat the system as a hold-vs-transfer architecture with a dormant release head. Only revisit release after transfer is healthy.
327
-
328
- ## 10. Recommended SLURM usage
329
-
330
- Two ready-to-edit sbatch files are included in this handoff bundle.
331
-
332
- Use `slurm_smoke.sbatch` first.
333
-
334
- Use `slurm_seed_sweep.sbatch` after the smoke run is green.
335
-
336
- The scripts intentionally use environment variables instead of hard-coded cluster-specific paths.
337
-
338
- ## 11. When to move beyond the current repo
339
-
340
- Move to the next stage only if all of the following are true.
341
-
342
- The proxy sanity gate passes.
343
-
344
- The candidate choice ratio is at or above 0.95 on the slim sweep.
345
-
346
- Transfer recall is consistently nonzero and improves with sequence horizon.
347
-
348
- The bag and cloth scenarios remain more transfer-heavy than foliage.
349
-
350
- Only then should you spend time on the first external simulation benchmark.
351
-
352
- ## 12. First external benchmark after this handoff
353
-
354
- The first external benchmark should be a **bag-only** pilot, not all three environments.
355
-
356
- Use DeformableRavens bag tasks as the first port target.
357
-
358
- For the first external baseline, use **ACT**, not OpenVLA-OFT. ACT is cheaper to stand up and is already a strong imitation-learning baseline for bimanual manipulation.
359
-
360
- The rule is simple.
361
-
362
- Do not burn cluster time on OFT or any large VLA until the current structure has shown that transfer is real and learnable in the slim proxy.
363
-
364
- ## 13. Minimal checklist for the assigned developer
365
-
366
- 1. Unzip the repo and handoff bundle into shared storage.
367
- 2. Verify Python, PyTorch, and pytest.
368
- 3. Run `pytest -q`.
369
- 4. Run `scripts/demo_inference.py`.
370
- 5. Run the 20-step smoke eval.
371
- 6. Run the two 80-step quick jobs (`sequence_horizon=1` and `3`).
372
- 7. Run the three-seed sweep for both horizons.
373
- 8. Summarize the six JSON files into a small table with the metrics in Section 8.
374
- 9. Decide: proceed, fix proxy, or fix branch-collapse.
375
-
376
- ## 14. Deliverables expected at the end of week 1
377
-
378
- By the end of the first iteration cycle, the developer should hand back exactly three things.
379
-
380
- A one-page table of runs and metrics.
381
-
382
- A sentence-level diagnosis of the dominant failure mode (proxy too weak, branch collapse, or candidate set weak).
383
-
384
- A concrete recommendation for the next change, with only one primary change proposed for week 2.