Skip to content

Commit 9966783

Browse files
abrichrclaude
andauthored
fix: remove orphaned outputs reference, clean up test suite (#206)
Bug: `gen_len = outputs[0].shape[0] - ...` was outside the if/else block — `outputs` only exists in the unconstrained path, crashing the constrained path with UnboundLocalError. Test cleanup: removed source-code-grepping tests (brittle, test implementation not behavior). Kept 31 tests that verify behavior: - Regex matching (valid/invalid inputs) - DFA quantifier limits - Outlines API contract (imports, dispatch types, image wrapper) - Generator cache sentinel logic - Task rotation (loading, explicit IDs, rotation coverage) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 00c0c33 commit 9966783

2 files changed

Lines changed: 94 additions & 232 deletions

File tree

openadapt_evals/training/standalone/trainer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ def _collect_rollout(self, task_id: str, instruction: str) -> Rollout:
252252
skip_special_tokens=True,
253253
)
254254
gen_len = outputs[0].shape[0] - inputs["input_ids"].shape[1]
255-
gen_len = outputs[0].shape[0] - inputs["input_ids"].shape[1]
256255
action = parse_vlm_output_to_action(decoded, screen_size=self._config.screen_size)
257256

258257
if gen_len >= self._config.max_new_tokens - 1:

0 commit comments

Comments
 (0)