Commit 8cff9ac
authored
[Evals] task error handling and memory cleanup (#1419)
# why
Error handling on tasks was causing the runner to idle. Also, proper log
cleanup is needed to prevent memory leaks.
# what changed
- Remove nested try/finally around task execution, let main try/catch
handle cleanup
- Add cleanup to EvalLogger
# test plan
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Improves eval task error handling and cleanup to prevent memory leaks
and dangling V3 sessions. Always closes resources and clears logs after
each task run.
- **Bug Fixes**
- Always close the V3 instance in a finally block; log close errors as
warnings so they don’t mask task results.
- Clear the EvalLogger after returning logs to free memory.
- Track v3Input at the outer scope to ensure cleanup on both success and
failure.
- **Refactors**
- Simplified result logging and removed nested try/finally around task
execution.
<sup>Written for commit 34aebe9.
Summary will update automatically on new commits.</sup>
<!-- End of auto-generated description by cubic. -->1 parent b40ae11 commit 8cff9ac
2 files changed
+39
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
274 | 277 | | |
275 | 278 | | |
276 | 279 | | |
| |||
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
398 | 394 | | |
| 395 | + | |
399 | 396 | | |
400 | 397 | | |
401 | 398 | | |
| |||
419 | 416 | | |
420 | 417 | | |
421 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
422 | 437 | | |
423 | 438 | | |
424 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
124 | 134 | | |
0 commit comments