fix(pytorch): add missing f-string prefixes to error messages#3256
Open
andrewwhitecdw wants to merge 2 commits into
Open
fix(pytorch): add missing f-string prefixes to error messages#3256andrewwhitecdw wants to merge 2 commits into
andrewwhitecdw wants to merge 2 commits into
Conversation
Signed-off-by: Andrew White <andrewh@cdw.com>
for more information, see https://pre-commit.ci
Contributor
Greptile SummaryThis PR fixes two error messages that were printing literal placeholder text instead of interpolated values due to missing
Confidence Score: 5/5Both changes are minimal, isolated one-character (plus reformatting) fixes to error message strings with no impact on control flow or data handling. The only changes are adding Files Needing Attention: No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile |
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.
Fix two error messages that print literal placeholders instead of the intended values.
In
QuantizedTensor.__torch_dispatch__, the placeholder{cls.__name__}was not interpolated because the string was missing thefprefix. Users calling.view()on a quantized tensor would see the literal text instead of the class name.In
NVFP4Tensor.__torch_dispatch__, the placeholder{len(args)}was not interpolated for the same reason, making the arg-count diagnostic misleading.Both fixes are one-character additions of the missing
fprefix, restoring the intended error diagnostics.