Repository navigation
[feat] support extra-info columns - #16
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new extra_info lookup regresses the default behavior when extra_info is unset, and the updated tests no longer exercise the default path.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an --extra-info (and EXTRA_INFO) option to the prep CLI and threads it through ProcArgs into the auto formatters so callers can choose which source column populates output extra_info/misc.
Changes:
- Add
extra_info: str | NonetoProcArgsandprepCLI options. - Update
auto_sft,auto_cls, andauto_verlto read extra info from a configurable column with a fallback behavior. - Adjust unit tests to pass
extra_info="extra_info"into formatter helpers.
File summaries
| File | Description |
|---|---|
| tests/formatter/test_auto_verl.py | Passes extra_info into auto_verl helper call. |
| tests/formatter/test_auto_sft.py | Passes extra_info into auto_sft helper call. |
| tests/formatter/test_auto_cls.py | Reformats the auto_cls call and passes extra_info. |
| src/prep/formatter/auto_verl.py | Adds extra_info parameter and uses it for extra_info.misc. |
| src/prep/formatter/auto_sft.py | Adds extra_info parameter and uses it for output extra_info. |
| src/prep/formatter/auto_cls.py | Adds extra_info parameter and uses it for output extra_info. |
| src/prep/cli.py | Adds --extra-info option and forwards it into ProcArgs. |
| src/prep/api/types.py | Adds ProcArgs.extra_info field. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
28
to
30
| "id": f"{data_name}/{idx:08d}", | ||
| "extra_info": e.get("extra_info", ""), | ||
| "extra_info": e.get(extra_info, extra_info) or "", | ||
| } |
Comment on lines
33
to
35
| "label": label, | ||
| "extra_info": e.get("extra_info", ""), | ||
| "extra_info": e.get(extra_info, extra_info) or "", | ||
| } |
Comment on lines
38
to
40
| "explanation": e.get("explanation", ""), | ||
| "misc": e.get("extra_info", ""), | ||
| "misc": e.get(extra_info, extra_info) or "", | ||
| }, |
Comment on lines
25
to
28
| q_template="Question: {question}", | ||
| a_template="{answer}", | ||
| extra_info="extra_info", | ||
| ) |
Comment on lines
+45
to
47
| transforms=[], | ||
| extra_info="extra_info", | ||
| ) |
Comment on lines
111
to
113
| style="rule", | ||
| extra_info="extra_info", | ||
| ) |
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.
Before submitting
Changes
extra_infocolumns (fallback toextra_infostring itself).