Skip to content

Update module wrapper so that params are explicitly registered to the wrapper #10357

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

lucylq
Copy link
Contributor

@lucylq lucylq commented Apr 22, 2025

Pull Request resolved: #10305

Seeing issue with linear where the fqns for constants disappear.

Registering self.method_name as a submodule of wrapper means that the parameters are registered to the wrapper. thanks @angelayi for the fix!

  File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 1980, in _export_for_training
    export_artifact = export_func(
  File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 1473, in _strict_export
    _replace_param_buffer_names(param_buffer_table, export_graph_signature)
  File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 272, in _replace_param_buffer_names
    spec.target = param_buffer_table[spec.target]
KeyError: 'L__self___fn___self___linear.weight'

ghstack-source-id: 279346028
@exported-using-ghexport

Differential Revision: D73279618

Copy link

pytorch-bot bot commented Apr 22, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10357

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 9a09392 with merge base 3eac583 (image):

NEW FAILURE - The following job has failed:

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

@facebook-github-bot facebook-github-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 Apr 22, 2025
… wrapper

Pull Request resolved: #10305

Seeing issue with linear where the fqns for constants disappear.

Registering self.method_name as a submodule of wrapper means that the parameters are registered to the wrapper. thanks @angelayi for the fix!

```
  File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 1980, in _export_for_training
    export_artifact = export_func(
  File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 1473, in _strict_export
    _replace_param_buffer_names(param_buffer_table, export_graph_signature)
  File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 272, in _replace_param_buffer_names
    spec.target = param_buffer_table[spec.target]
KeyError: 'L__self___fn___self___linear.weight'
```
ghstack-source-id: 279346028
@exported-using-ghexport

Differential Revision: [D73279618](https://our.internmc.facebook.com/intern/diff/D73279618/)
@lucylq lucylq force-pushed the gh/lucylq/61/orig branch from 58c3cf2 to 9a09392 Compare April 22, 2025 17:36
@kirklandsign kirklandsign changed the title Gh/lucylq/61/orig Refactor export_delegated_program Apr 22, 2025
@kirklandsign kirklandsign changed the title Refactor export_delegated_program Update module wrapper so that params are explicitly registered to the wrapper Apr 22, 2025
@lucylq lucylq marked this pull request as ready for review April 22, 2025 17:41
@lucylq lucylq requested a review from larryliu0820 as a code owner April 22, 2025 17:41
@lucylq lucylq merged commit d33986c into main Apr 22, 2025
168 of 170 checks passed
@lucylq lucylq deleted the gh/lucylq/61/orig branch April 22, 2025 20:40
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. topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants