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.
Fix three notebook regressions caught by Blackwell Docker validation #694
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
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Fix three notebook regressions caught by Blackwell Docker validation #694
Changes from 12 commits
c28a4a60f9153ca5770ba62b70171d96f7c6dec60630d603e08d5844fd59961d17e5684f7b57cb8e681c55f17fcFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
The check for
_user_paddingcan crash iftext_kwargsis explicitly passed asNoneinkwargs. Using a more robust check would prevent a potentialAttributeErrorwhen calling.get()on aNoneTypeobject.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.
The new
_user_paddingdetection assumeskwargs["text_kwargs"]is always a dict, butkwargs.get("text_kwargs", {}).get("padding")will raiseAttributeErrorwhen callers passtext_kwargs=None(a common pass-through pattern for optional kwargs). In that caseGemma3Processor.__call__now fails before_merge_kwargscan normalize defaults, turning previously valid invocations into runtime crashes.Useful? React with 👍 / 👎.
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.
The
_text_rowscalculation does not account for cases wheretextisNonebutimagesis a batch (e.g., a list of lists of images). In such cases,textis generated as a list of strings later in the function (line 162). If these generated strings have different lengths (due to varying image counts per batch item), the processor will crash when stacking tensors because padding was not forced to 'longest'. Consider checking the batch size ofimageswhentextisNone.Uh oh!
There was an error while loading. Please reload this page.
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.
This module invokes
_ensure_notebook_chain()at import time, andtemporary_patches/__init__.pynow imports this file unconditionally, so a normalimport unslothcan immediately trigger pip installation attempts fortraitlets. That introduces network/package-manager side effects in non-notebook runs and can block or fail startup in restricted/offline environments before any notebook code path is used.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.