Repository navigation
[guards] Name the attribute path when a guard value cannot be pickled - #194283
Closed
bobrenjc93 wants to merge 3 commits into
Closed
bobrenjc93 wants to merge 3 commits into
bobrenjc93 wants to merge 3 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/194283
Note: Links to docs will display an error until the docs builds have been completed. ❌ 12 New Failures, 1 Unrelated FailureAs of commit 23a5c60 with merge base 1b4e490 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Aug 20, 2026
Closed
Closed
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This was referenced Aug 20, 2026
This was referenced Aug 22, 2026
Closed
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
Contributor
Author
|
@bobrenjc93 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Author
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.
Stack from ghstack (oldest at bottom):
"PackageError: TypeError: cannot pickle 'generator' object" names a type and
nothing else. In a model with a thousand-frame guard tree that is not
actionable: finding which of them holds the generator means instrumenting the
pickler by hand and re-running a capture that takes minutes. One user did that
twice at 13 minutes a cycle.
Everything needed is already at the raise site, so the error now walks the
scopes the guard state carries and appends the first path whose value has the
failing type:
Best-effort by construction, and every line of it is inside the guard --
including the regex that reads the type out of the message. This runs while an
exception is already being raised, so a failure here must stay silent rather
than replace the real error with its own; an early version got that wrong and
turned the report into a bare NameError.
Test Plan:
Two tests: one asserts the path is reported for a nested unpicklable attribute,
and one asserts a walker that raises still returns "" rather than masking the
error it was describing.
Authored with an AI assistant.
Differential Revision: D116840944