Skip to content

skip compiling opt step instead of erroring if opt_in_bwd=True #2827

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 6 commits into
base: main
Choose a base branch
from

Conversation

felipemello1
Copy link
Contributor

Context

What is the purpose of this PR? Is it to

  • add a new feature
  • fix a bug
  • update tests and/or documentation
  • other (please add here)

Changelog: as in the title

Copy link

pytorch-bot bot commented Jun 13, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 72d0b6f with merge base 2344509 (image):
💚 Looks good so far! There are no failures yet. 💚

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 Jun 13, 2025
Copy link
Contributor

@joecummings joecummings left a comment

Choose a reason for hiding this comment

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

Why? This doesn't happen that far into the process and it's a simple solution to just change compile optimizer step to false.

If anything, you could provide a better error message like "If you would still like to compile the model and loss, you can specify everything in the config like

blah blah blah"

@felipemello1
Copy link
Contributor Author

Why? This doesn't happen that far into the process and it's a simple solution to just change compile optimizer step to false.

If anything, you could provide a better error message like "If you would still like to compile the model and loss, you can specify everything in the config like

blah blah blah"

I was doing llama 70B. It takes several minutes for it to start (not sure why). And then it errored. So for me, it felt far into the process. If you dont like skipping and prefer it to just error, i could do this logic in the init instead.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants