-
Notifications
You must be signed in to change notification settings - Fork 734
Update exir_deserialize logic #15840
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15840
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f1003ce with merge base 3826f44 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@ethansfng has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87112636. |
This PR needs a
|
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.
Pull Request Overview
This PR fixes a bug in the metadata_split function used during deserialization of nn_module_stack metadata. The old implementation incorrectly removed parentheses and their content before splitting, which failed when paths contained nested getattr() calls (e.g., getattr(getattr(L['self'].layers, '0'), '3')). The new implementation properly handles nested parentheses and brackets by tracking depth while parsing.
Key Changes
- Replaced regex-based splitting logic with a depth-tracking parser that correctly handles nested parentheses/brackets
- Updated comment to reflect the new approach for handling nested structures
- Preserved the requirement that metadata must split into exactly 3 parts (key, path, type)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ethansfng Please see the copilot recommendations, they look pretty good |
Summary: Pull Request resolved: pytorch#15840 Reviewed By: mcremon-meta Differential Revision: D87112636
235ee89 to
a53e8c5
Compare
Summary: Pull Request resolved: pytorch#15840 Reviewed By: mcremon-meta Differential Revision: D87112636
a53e8c5 to
175d341
Compare
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary: Pull Request resolved: pytorch#15840 Reviewed By: mcremon-meta Differential Revision: D87112636
175d341 to
f1003ce
Compare
Differential Revision: D87112636