Skip to content

Support nn_module_stack in torch.export(strict=False)#115454

Closed
tugsbayasgalan wants to merge 14 commits intogh/tugsbayasgalan/178/basefrom
gh/tugsbayasgalan/178/head
Closed

Support nn_module_stack in torch.export(strict=False)#115454
tugsbayasgalan wants to merge 14 commits intogh/tugsbayasgalan/178/basefrom
gh/tugsbayasgalan/178/head

Conversation

@tugsbayasgalan
Copy link
Copy Markdown
Contributor

@tugsbayasgalan tugsbayasgalan commented Dec 8, 2023

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Dec 8, 2023

🔗 Helpful Links

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

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

❗ 1 Merge Blocking SEVs

There is 1 active merge blocking SEVs. Please view them below:

If you must merge, use @pytorchbot merge -f.

✅ You can merge normally! (2 Unrelated Failures)

As of commit 874ec75 with merge base 1474eb5 (image):

UNSTABLE - The following jobs failed but were likely due to flakiness present on trunk and has been marked as unstable:

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

tugsbayasgalan added a commit that referenced this pull request Dec 8, 2023
ghstack-source-id: 1634a3b
Pull Request resolved: #115454
[ghstack-poisoned]
[ghstack-poisoned]
tugsbayasgalan added a commit that referenced this pull request Dec 9, 2023
ghstack-source-id: 832bed4
Pull Request resolved: #115454
@tugsbayasgalan tugsbayasgalan changed the title TEST [WIP] Support nn_module_stack in torch.export(strict=False) Dec 9, 2023
@tugsbayasgalan tugsbayasgalan requested review from bdhirsh and suo December 9, 2023 20:21
return super().getattr(attr, attr_val, parameter_proxy_cache)
return self.proxy_type(attr_val, attr)

def call_module(self, m, forward, args, kwargs):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes the preserve_signature handling of the version in aot_export. We need this logic, right? Otherwise preserve_signature does not function correctly for non-strict mode?

I'm okay with taking this as a follow-up, but let's make sure to track it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep will do that as follow up.

tugsbayasgalan added a commit that referenced this pull request Dec 13, 2023
ghstack-source-id: 29cca95
Pull Request resolved: #115454
torch.set_autocast_cache_enabled(old_value)


class ModuleStackTracer(PythonKeyTracer):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @zou3519 (Ed's out - anyone else you think should review this?)

@suo suo self-requested a review December 13, 2023 17:32
@tugsbayasgalan tugsbayasgalan added the ciflow/trunk Trigger trunk jobs on your pull request label Dec 19, 2023
@tugsbayasgalan
Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@jeanschmidt
Copy link
Copy Markdown
Contributor

@pytorchbot revert -m "Breaking internal tests recycle_bin_citadel and executorch, check internal diff to see more details" -c nosignal

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Reverting PR 115454 failed

Reason: Command git -C /home/runner/work/pytorch/pytorch revert --no-edit 6730b5bcb41e0519572759d9ad9852a113d0a7e4 returned non-zero exit code 1

Auto-merging test/export/test_export.py
Auto-merging test/test_proxy_tensor.py
Auto-merging torch/_functorch/_aot_autograd/dispatch_and_compile_graph.py
CONFLICT (content): Merge conflict in torch/_functorch/_aot_autograd/dispatch_and_compile_graph.py
Auto-merging torch/_functorch/_aot_autograd/traced_function_transforms.py
Auto-merging torch/_functorch/aot_autograd.py
CONFLICT (content): Merge conflict in torch/_functorch/aot_autograd.py
Auto-merging torch/export/_trace.py
Auto-merging torch/fx/experimental/proxy_tensor.py
error: could not revert 6730b5bcb41... Support nn_module_stack in torch.export(strict=False) (#115454)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git revert --continue".
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".
Details for Dev Infra team Raised by workflow job

pytorchmergebot referenced this pull request Dec 21, 2023
pytorchmergebot added a commit that referenced this pull request Dec 21, 2023
This reverts commit a267d67.

Reverted #115188 on behalf of https://github.com/jeanschmidt due to sadly, it is required to revert this commit in order to revert #115454 ([comment](#115188 (comment)))
@jeanschmidt
Copy link
Copy Markdown
Contributor

@pytorchbot revert -m "Breaking internal tests recycle_bin_citadel and executorch, check internal diff to see more details" -c nosignal

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@tugsbayasgalan your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Dec 21, 2023
This reverts commit 6730b5b.

Reverted #115454 on behalf of https://github.com/jeanschmidt due to Breaking internal tests recycle_bin_citadel and executorch, check internal diff to see more details ([comment](#115454 (comment)))
@malfet
Copy link
Copy Markdown
Contributor

malfet commented Dec 21, 2023

cc: @huydhn @mergennachin do you know why wasn't it caught in OSS, as we run executorch builds there now, don't we?

dmenig pushed a commit to dmenig/pytorch that referenced this pull request Dec 21, 2023
tugsbayasgalan added a commit to tugsbayasgalan/executorch-1 that referenced this pull request Dec 22, 2023
Summary:
X-link: pytorch/pytorch#115454
Approved by: https://github.com/suo, https://github.com/bdhirsh

Differential Revision: D52339616

Pulled By: tugsbayasgalan
@tugsbayasgalan
Copy link
Copy Markdown
Contributor Author

@huydhn
Copy link
Copy Markdown
Contributor

huydhn commented Dec 27, 2023

cc: @huydhn @mergennachin do you know why wasn't it caught in OSS, as we run executorch builds there now, don't we?

The build was green https://github.com/pytorch/pytorch/actions/runs/7269905380/job/19808210062 on OSS and we pre-build ExecuTorch in Docker. However, it was built with against a 2-week old commit from what I see https://github.com/pytorch/pytorch/blob/6730b5bcb41e0519572759d9ad9852a113d0a7e4/.ci/docker/ci_commit_pins/executorch.txt. This could explain why OSS CI missed it. ExecuTorch on fbcode, on the other hand, used a newer commit for sure.

This PR #115599 was supposed to land ExecuTorch latest main commit, but I think GitHub had a hiccup here and pytorchbot didn't stamp the approval as usual. I didn't know about this till last Friday when I stamped the approval myself.

It looks ok now in the recent updates:

Having a way to notify oncall about repeated failed attempts to merge an auto commit hash update might be the answer here (stale commit)

@facebook-github-bot facebook-github-bot deleted the gh/tugsbayasgalan/178/head branch December 28, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants