Skip to content

[bugfix] fix unclosed file handle in benchmark#431

Merged
tiankongdeguiji merged 1 commit intoalibaba:masterfrom
tiankongdeguiji:fix/benchmark-unclosed-file
Mar 29, 2026
Merged

[bugfix] fix unclosed file handle in benchmark#431
tiankongdeguiji merged 1 commit intoalibaba:masterfrom
tiankongdeguiji:fix/benchmark-unclosed-file

Conversation

@tiankongdeguiji
Copy link
Copy Markdown
Collaborator

Summary

  • Fixed resource leak in tzrec/benchmark/benchmark.py where a file was opened with open() but never closed
  • Changed to use with context manager for proper cleanup

Test plan

  • Verify benchmark still reads base metrics correctly

🤖 Generated with Claude Code

Use context manager to ensure the file is properly closed after reading
base evaluation metrics, preventing resource leaks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tiankongdeguiji tiankongdeguiji merged commit 5ac66da into alibaba:master Mar 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants