Commit 295ab07
committed
fix(api/task): guard empty results list in process_results
For generate_until / generate_visual_cot tasks, when a sample's
generation failed upstream (model raised, retries exhausted, etc.)
the results list can be empty. The existing isinstance check then
falls through to `results[0]` on the list-of-list branch and raises
IndexError — which aborts the full postprocess loop for that task,
not just the missing sample.
Add a leading `results and` so an empty list falls through to the
else branch that does `[res.strip() for res in results]` (empty
output) — downstream task-level process_results then receives an
empty list and can decide how to score the missing sample without
taking down the whole task.1 parent 4caa4a6 commit 295ab07
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1576 | 1576 | | |
1577 | 1577 | | |
1578 | 1578 | | |
1579 | | - | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
1580 | 1583 | | |
1581 | 1584 | | |
1582 | 1585 | | |
| |||
0 commit comments