Improve error message when tokenize_*_data config doesn't match dataset#3856
Open
Improve error message when tokenize_*_data config doesn't match dataset#3856
Conversation
c81e688 to
c23cd2f
Compare
|
🤖 Hi @aireenmei, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
The PR significantly improves error messages when data tokenization configuration doesn't match the dataset format, which is a great UX improvement. It consolidates validation logic into NormalizeFeatures and adds specific validation for TFDS.
🔍 General Feedback
- The refactoring of
NormalizeFeaturesinto a universal validator is a good architectural move as it centralizes the data type checks. - One small regression is the loss of the descriptive "missing column" error message when
KeepFeatureswas removed, which I've suggested adding back. - Overall, the code is clean and the error messages are very helpful and actionable for users.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
e884f05 to
f5df57b
Compare
f5df57b to
2b02e64
Compare
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
Currently when the flag
tokenize_{train/eval}_datadoesn't match with the dataset (pre-tokenized or not), the data pipeline often crash without clear error message, for example: https://buganizer.corp.google.com/issues/509946269#comment10Tests
Manually tested
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.