Repository navigation
Address post-merge review of the chat JSONL blend and the Super VL QAD tutorial #2863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8ea9b35
Skip chat rows that cannot be converted instead of failing the source
yueshen2016 54a6ce0
Address post-merge review of the chat JSONL blend and the Super VL QA…
yueshen2016 0f2d986
Drop the scope note from the Super VL QAD tutorial
yueshen2016 c28c50c
State the tutorial's recipe, data and evaluation relative to the rele…
yueshen2016 5e82b01
Address Claude review of the chat blend row handling
yueshen2016 dd90794
Show the Super VL tutorial's vLLM serve command
yueshen2016 5969e19
Merge main into yueshen/qad-tutorial-followups
yueshen2016 40cf8fd
Give the Super VL tutorial's blend command the full config path
yueshen2016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
File renamed without changes.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[IMPORTANT Compatibility] The per-row
tryalso swallows the config-levelKeyErrorthat used to fail fast, turning a typo into a silent 100% rejection.source["content_field"]is evaluated inside the newtry.prepare_chat_data_blendvalidates the values ofcontent_field(line 377:{source["content_field"] for ...} - {"messages", "text"}) — but that validation itself raisesKeyErroronly on themessages/textpath, and crucially_take_chat_rowsis also reachable with a source dict whosecontent_fieldkey is absent in thefiles:shape used by this PR's own test fixture path. Any suchKeyErrornow gets caught, printed once per row as "skipping a row that cannot be converted", and counted as a rejection.The consequence: instead of one clear
KeyError: 'content_field', the user gets10 * want + 100warning lines (for the tutorial's largest source, ~7,000 lines) and thenonly 0/6890 usable rows (gave up after 6891 rejected rows)— which reads as "this dataset is bad", not "my YAML is wrong". Same forreasoning_contentbeing an invalid mode:prepare_messages_for_chat_templateraisesValueError, which is now per-row-swallowed rather than surfacing.Hoist the lookup out of the loop so a config error can't be mistaken for data:
That keeps the intended fix (a malformed row is skipped) while a malformed source still fails on the first access, before any rows are read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5e82b01:
content_fieldis now read once, before the per-rowtry, so a source without it raisesKeyErrorinstead of rejecting every row. Through the public entry point this was already caught earlier, sinceprepare_chat_data_blendvalidatescontent_fieldup front (lines 377 and 383); the hoist covers direct callers of_take_chat_rows. A test now checks theKeyError.