kai0 icon indicating copy to clipboard operation
kai0 copied to clipboard

fix: force intervention frames to Advantage: positive (pi*0.6 spec)

Open jiabinq opened this issue 8 months ago • 0 comments

Summary

  • Force human intervention frames (intervention=1) to the highest advantage bin in both staged and non-staged labeling paths, matching the pi*0.6 specification
  • Add --task-text CLI arg to replace hardcoded "fold the cloth" in tasks.jsonl
  • Add 5 unit tests for intervention forcing (binary/n_slices x staged/non-staged + backward compat)

Problem

discretize_advantage.py labels frames purely by advantage percentile. Human expert corrections in DAgger episodes get no special treatment — ~70% end up labeled "Advantage: negative" because the advantage estimator assigns low values at intervention moments (the robot was failing right before the human took over). At inference with "Advantage: positive", the model avoids reproducing those corrective actions, resulting in weak recovery behavior.

Pi*0.6 specifies that intervention frames must always be forced to positive. Evo-RL implements this correctly (force_intervention_positive=True).

Test plan

  • [x] 5 pytest tests passing (test_discretize_advantage.py)
  • [x] Backward compatible — no-op when intervention column is absent

jiabinq avatar Mar 10 '26 02:03 jiabinq