Skip to content

Comments

Fix empty slice#701

Merged
mikasenghaas merged 1 commit intomainfrom
fix-empty-slice
Jan 7, 2026
Merged

Fix empty slice#701
mikasenghaas merged 1 commit intomainfrom
fix-empty-slice

Conversation

@mikasenghaas
Copy link
Member

@mikasenghaas mikasenghaas commented Jan 7, 2026

Description

If vf-eval crashes before any event loop lag is measured, the printing of results fails because numpy cannot compute statistics over an empty list. This PR fixes this by guarding the printing, i.e. only print if >= 1 measurement has been made.

Before

Screenshot 2026-01-07 at 4 01 26 PM

After

Screenshot 2026-01-07 at 4 02 06 PM

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Prevents a crash when printing evaluation results if no event loop lag measurements were collected.

  • In verifiers/utils/eval_utils.py, print_results now prints the "Performance" section only when event_loop_lags is non-empty (if event_loop_lags:), avoiding numpy empty-slice statistics on an empty list.

Written by Cursor Bugbot for commit e245e01. This will update automatically on new commits. Configure here.

@mikasenghaas mikasenghaas requested a review from willccbb January 7, 2026 15:00
@mikasenghaas mikasenghaas marked this pull request as ready for review January 7, 2026 15:02
@mikasenghaas mikasenghaas merged commit 15f68ca into main Jan 7, 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.

1 participant