Skip to content

Conversation

@ethansfng
Copy link
Contributor

@ethansfng ethansfng commented Nov 15, 2025

Differential Revision: D87112636

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 15, 2025

🔗 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 Failures

As of commit f1003ce with merge base 3826f44 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 15, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 15, 2025

@ethansfng has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87112636.

@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Contributor

Copilot AI left a 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.

@mergennachin
Copy link
Contributor

@ethansfng Please see the copilot recommendations, they look pretty good

ethansfng added a commit to ethansfng/executorch that referenced this pull request Nov 17, 2025
Summary: Pull Request resolved: pytorch#15840

Reviewed By: mcremon-meta

Differential Revision: D87112636
@lucylq lucylq requested a review from Gasoonjia November 17, 2025 17:40
ethansfng added a commit to ethansfng/executorch that referenced this pull request Nov 17, 2025
Summary: Pull Request resolved: pytorch#15840

Reviewed By: mcremon-meta

Differential Revision: D87112636
@mergennachin mergennachin requested a review from Copilot November 17, 2025 17:59
Copilot finished reviewing on behalf of mergennachin November 17, 2025 18:01
Copy link
Contributor

Copilot AI left a 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
@meta-codesync meta-codesync bot merged commit cf0e9aa into pytorch:main Nov 17, 2025
145 of 146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants