Skip to content
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

Updating gradient clipping to be torch 2.0 compatible #2089

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

bcui19
Copy link
Contributor

@bcui19 bcui19 commented Mar 24, 2023

What does this PR do?

In torch 2.0 they change the error message that is thrown for gradient clipping. This PR adds code to catch this new error message.

ran locally with torch 2.0:
https://wandb.ai/mosaic-ml/examples_fork-examples_llm/runs/prr9w4gb?workspace=user-bcui

link to PyTorch 2.0 new error message:
https://github.com/pytorch/pytorch/blob/master/torch/distributed/fsdp/fully_sharded_data_parallel.py#L1000

What issue(s) does this change relate to?

CO-1955

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@bcui19 bcui19 marked this pull request as ready for review March 24, 2023 18:17
@bcui19 bcui19 changed the title [DRAFT] Updating gradient clipping to be torch 2.0 compatible Updating gradient clipping to be torch 2.0 compatible Mar 24, 2023
@bcui19 bcui19 merged commit 36ae9c7 into mosaicml:dev Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants