Repository navigation
fix: warn when a task resolves to zero datasets - #57
Merged
Merged
Conversation
Task.__init__ silently produced an empty task in two cases: when the requested languages matched no dataset (for cross-lingual tasks the request must cover both query and target languages), and when every selected dataset was skipped with DatasetConfigNotSupported during loading. Both cases now log a warning that names the task and explains why it is empty. Reported by a RecSys 2026 reviewer: SearchQueryCandidateRanking with languages=["de"] returned empty results with no indication why.
warreveys
approved these changes
Jul 22, 2026
warreveys
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution!
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.
Description
Task.__init__silently produced an empty task in two cases: when the requested languages matched no dataset, and when every selected dataset was skipped withDatasetConfigNotSupportedduring loading. Both cases now log a warning that names the task and explains why it is empty.SearchQueryCandidateRanking(split="test", languages=["de"])selects nothing. The warning states this and shows the required call shape (e.g.languages=["de", "en"]for a German-to-English dataset).examples/run_paper_results.pyexpectsMELSRankingto have zero datasets forlanguages=["en"]).TestEmptyDatasetWarningsintests/test_task_loading.pycovers both warnings plus a no-warning control case. The tests use an autouse fixture that temporarily enables propagation on theworkrblogger, sincesetup_loggersetspropagate = False, which hides records from pytest'scaplog.Checklist