Skip to content

fix: warn when Eval() receives an empty dataset#109

Merged
eric kontargyris (ekon15) merged 3 commits intomainfrom
warn-on-empty-eval-dataset
Mar 21, 2026
Merged

fix: warn when Eval() receives an empty dataset#109
eric kontargyris (ekon15) merged 3 commits intomainfrom
warn-on-empty-eval-dataset

Conversation

@ekon15
Copy link
Contributor

Summary

  • Prints a warning to stderr when run_evaluator iterates zero data rows
  • Prevents users from silently landing on an empty experiment in the UI with no indication of what went wrong
  • No change to control flow — experiment still runs (just empty), warning is informational

Test plan

  • New test: test_run_evaluator_empty_dataset_warns — asserts warning appears in stderr when data=[]
  • All existing test_framework.py tests unaffected

🤖 Generated with Claude Code

Print a warning to stderr when no data rows are found after iterating
the dataset, so users get an actionable signal instead of silently
landing on an empty experiment in the UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tasks.append(asyncio.create_task(with_max_concurrency(run_evaluator_task(datum, trial_index))))

if not tasks:
print(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we switch this to use eprint? We might also want to use bcolors.WARNING.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — switched to eprint with bcolors.WARNING.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) changed the title warn when Eval() receives an empty dataset fix: warn when Eval() receives an empty dataset Mar 20, 2026
@ekon15 eric kontargyris (ekon15) merged commit 4f1d951 into main Mar 21, 2026
33 checks passed
@ekon15 eric kontargyris (ekon15) deleted the warn-on-empty-eval-dataset branch March 21, 2026 07:50
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