Skip to content

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

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 2 commits into from
Apr 21, 2025

Conversation

lucylq
Copy link
Contributor

@lucylq lucylq commented Apr 18, 2025

Stack from ghstack (oldest at bottom):

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. cc @angelayi

  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'

Differential Revision: D73279618

… wrapper

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. cc @angelayi

```
  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'
```

Differential Revision: [D73279618](https://our.internmc.facebook.com/intern/diff/D73279618/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Apr 18, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 2 New Failures, 1 Unrelated Failure

As of commit fc5b3f8 with merge base 06f912d (image):

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.

@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 18, 2025
lucylq added a commit that referenced this pull request Apr 18, 2025
… wrapper

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. cc angelayi

```
  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'
```

Differential Revision: [D73279618](https://our.internmc.facebook.com/intern/diff/D73279618/)

ghstack-source-id: 279019422
Pull Request resolved: #10305
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73279618

…ered to the wrapper"

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. cc angelayi

```
  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'
```

Differential Revision: [D73279618](https://our.internmc.facebook.com/intern/diff/D73279618/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73279618

@facebook-github-bot facebook-github-bot merged commit 73f4118 into gh/lucylq/61/base Apr 21, 2025
155 of 159 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/lucylq/61/head branch April 21, 2025 21:52
lucylq added a commit that referenced this pull request 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 added a commit that referenced this pull request Apr 22, 2025
… wrapper (#10357)

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/)
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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants