Repository navigation
CLI eval tests: index staged tasks by their task key, like lm-eval - #18357
Merged
Merged
Conversation
#18319 stages a standalone custom task YAML as task_<n>.yaml so a task name like ../x cannot leave the staging dir. lm-eval names tasks by the task:/group: key inside each file, so behaviour is unchanged, but the fake TaskManager in test_eval.py indexed by file stem and two tests pinned the old <name>.yaml copy, so 6 tests fail on main. Index the fake by the in-file key (as lm_eval/tasks/_index.py does) and assert the staged copy's content instead of its file name.
Member
Author
|
@codex review |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Summary
Six tests in
unsloth_cli/tests/test_eval.pyfail on main since #18319:They show up on every PR's CPU test run (for example on the staging runs for #18332, #18334 and #18338).
Cause
#18319 stages a standalone custom task YAML as
task_<n>.yamlinstead of<task name>.yaml, so a task name like../../xcannot write outside the staging directory. That change is correct. lm-eval names tasks by thetask:/group:key inside each file, not by the file name:lm_eval/tasks/_index.pyglobs**/*.yamland registerscfg["task"]orcfg["group"](checked against lm-eval 0.4.13). The task name the user passes and sees is unchanged.The tests were wrong in two ways:
TaskManagerused by the CLI integration tests indexed tasks byp.stem. Real lm-eval does not, so a correctly stagedtask_1.yamlholdingtask: qaread as an unknown task.custom/qa.yaml,["my_task.yaml"]).Fix
Test-only:
TaskManagernow indexes each YAML under the include path by its in-filegroup:/task:key, the same way lm-eval does..yaml, whose content matches the source file and whosetask:key is the requested name.Verification
unsloth_cli/commands/eval.py<name>.yamlstaging)task:key (sabotage)tests/test_eval_custom_task_staging.pyfrom #18319 still passes. ruff check is clean.