Skip to content

Replace export_for_training with torch.export.export #2724

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

Open
wants to merge 3 commits into
base: gh/andrewor14/22/base
Choose a base branch
from

Conversation

andrewor14
Copy link
Contributor

@andrewor14 andrewor14 commented Aug 8, 2025

Stack from ghstack (oldest at bottom):

Summary: Bypasses the following deprecation warning:

`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.

Bonus: remove some references to capture_pre_autograd_graph,
which is even older.

Test Plan: CI

**Summary:** Bypasses the following deprecation warning:

```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```

Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.

**Test Plan:** CI

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Aug 8, 2025

🔗 Helpful Links

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

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

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

andrewor14 added a commit that referenced this pull request Aug 8, 2025
**Summary:** Bypasses the following deprecation warning:

```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```

Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.

**Test Plan:** CI

ghstack-source-id: 6411849
Pull Request resolved: #2724
@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 Aug 8, 2025
@andrewor14 andrewor14 requested a review from jerryzh168 August 8, 2025 21:31
Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

great, thanks!

**Summary:** Bypasses the following deprecation warning:

```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```

Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.

**Test Plan:** CI

[ghstack-poisoned]
andrewor14 added a commit that referenced this pull request Aug 8, 2025
**Summary:** Bypasses the following deprecation warning:

```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```

Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.

**Test Plan:** CI

ghstack-source-id: 6d95765
Pull Request resolved: #2724
@andrewor14 andrewor14 added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Aug 8, 2025
**Summary:** Bypasses the following deprecation warning:

```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```

Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.

**Test Plan:** CI

[ghstack-poisoned]
andrewor14 added a commit that referenced this pull request Aug 12, 2025
**Summary:** Bypasses the following deprecation warning:

```
`torch.export.export_for_training` is deprecated and will be removed in PyTorch 2.10.
Please use `torch.export.export` instead, which is functionally equivalent.
```

Bonus: remove some references to `capture_pre_autograd_graph`,
which is even older.

**Test Plan:** CI

ghstack-source-id: 27faec4
Pull Request resolved: #2724
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: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants