Repository navigation
Reject ambiguous combined evaluation result keys - #849
Open
FOWEPJF255 wants to merge 1 commit into
Open
FOWEPJF255 wants to merge 1 commit into
FOWEPJF255 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.
Fixes #834.
combine()can silently discard a score when the existing prefix rules produce a key already present in the final result. This affects both generated-prefix/raw-key collisions and forced-prefix combinations such asa_b+canda+b_c.Compute the existing final key before insertion and raise a descriptive
ValueErroron collision. Collision-free names and values keep their current behavior. This deliberately reports ambiguous output instead of introducing an automatic-renaming policy. Thecombinedocstring documents the exception.The regression tests use real local evaluation modules and
combine().compute(). They cover default and forced prefixes in both input orders, numbered duplicate module names, and a collision-free control. This implementation starts from official upstream main; related #835 is closed and unmerged.Validation on Windows/Python 3.12.10, Datasets 2.21.0, NumPy 1.26.4 and PyArrow 17.0.0:
python -m pytest tests/test_metric.py -k 'not modules_from_string' -q: 28 passed, 2 skipped for optional Torch/TensorFlow, 2 Hub-loading tests deselected.git diff --checkpasses.module.py,utils/file_utils.pyandutils/logging.py. Running the same checker against those exact files from unchanged main reproduces all six. No unrelated lint edits are included.I attempted the contribution guide's self-assignment step on #834, but GitHub denied the assignment operation for this account. The reproduction and work plan are recorded in the issue.
AI assistance: OpenAI Codex assisted with investigation, implementation, tests and this description. The checks above were executed locally.