Repository navigation
Validate sample indices when reporting evaluation coverage - #33
Open
zhachar14h-cell wants to merge 1 commit into
Open
zhachar14h-cell wants to merge 1 commit into
zhachar14h-cell wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The evaluation scorer can report
coverage_complete: trueeven when expected samples are missing. With two tasks andn_sample=2, task A with indices[0]and task B with[0, 1, 2]satisfy the current task-presence and total-count checks. Shifted or negative sample indices can also pass. This matters because the evaluation README requires complete coverage for a valid reported Pass@1 result.Check that every sample index lies in
[0, n_sample)before marking coverage complete. Sinceload_rawdeduplicates(task_id, sample_idx), the existing total-count and task-presence checks then establish that every expected pair is present. Invalid coverage uses the existing warning and summary flag; scoring remains available.Add eight CPU-only tests that run
score_runagainst temporary datasets, metadata, and rank output files, checking the persisted summary and warning. Cover complete and out-of-order samples, missing tasks/samples, extra samples, uneven counts, shifted indices, and negative indices.Validation (Windows, Python 3.13.12, pytest 8.4.2, Ruff 0.15.0):
python -m pytest -q tests/eval/test_score_coverage.py— 8 passed.ruff check --no-cacheandruff format --check --no-cachepassed (271 Python files).git diff --checkpassed.Linux/Python 3.12 and the GPU/NPU inference suite were not exercised.