Views
No views yet
📝 This is the submission blog post for ML Debug Env — Meta × PyTorch × Scaler OpenEnv Hackathon 2026
reset(), the agent receives only a minimal alert — the kind of message an on-call engineer sees at 2am:"Training job failed. Final loss: nan."| Tool | What it returns |
|---|---|
run_code | Runs the buggy script, returns stdout/stderr |
get_traceback | Returns full traceback if code crashed |
inspect_gradients | Injects gradient norm logging, runs one batch |
print_shapes | Injects shape hooks, returns tensor dims at each layer |
view_source | Reveals the full buggy script (costs 1 step) |
| Task | Difficulty | What's Broken |
|---|---|---|
shape_mismatch | Easy | nn.Linear input dim wrong → explicit crash |
training_collapse | Medium | Bad LR → NaN loss, or wrong loss fn → plateau |
wrong_device | Medium | Model on GPU, data on CPU → explicit crash |
gradient_not_zeroed | Medium-Hard | Missing zero_grad() → loss explodes silently |
data_leakage | Hard | Normalized before split → metrics look great but invalid |
missing_eval_mode | Hard | No model.eval() → non-deterministic metrics |
compound_shape_device | Medium-Hard | TWO bugs: shape mismatch + device mismatch |
compound_leakage_eval | Expert | TWO bugs: data leakage + missing eval mode |
0.01 → Wrong bug type identified
0.20 → Right type, fixed code crashes
0.40 → Code runs, training doesn't complete
0.60 → Training completes, root cause not fixed
0.80 → Root cause fixed, success signal not confirmed
0.99 → Perfect fix — code runs, training finishes, signal confirmedview_source on every task.AdversarialScheduler tracks per-task performance across episodes. Bug types where the agent consistently scores below 0.6 are marked "weak." Future reset() calls serve weak tasks 70% of the time with random seeds (novel code variants), and strong tasks only 30% of the time. The environment gets harder as the agent improves — exactly like the adversarial designer pattern from Kube SRE Gym.Qwen2.5-1.5B-Instruct using GRPO (Group Relative Policy Optimization) with LoRA (4-bit, rank 16) on the environment.view_source on almost every task — brute force patterncompound_leakage_eval — tries to inspect but can't complete the workflow
run_code → inspect_gradients before viewing sourceview_source to evidence-based run_code + inspect_gradients — is the behavior the reward signal shaped. The agent learned it without being told.Agent
│
│ reset() → alert only (no code)
▼
FastAPI Server (OpenEnv)
│
├── inspect action → execute_tool() → tool output
│ run_code, get_traceback, inspect_gradients,
│ print_shapes, view_source
│
├── fix action → Grader.grade()
│ subprocess.run(fixed_code)
│ 6-stage scoring + LLM judge
│ efficiency multiplier (1.0–1.2×)
│
└── AdversarialScheduler
tracks weak tasks → skews future resets
random seeds for novel variants