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

Update types to follow PEP 585 #2697

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Update types to follow PEP 585 #2697

merged 3 commits into from
Nov 10, 2023

Conversation

b-chu
Copy link
Contributor

@b-chu b-chu commented Nov 8, 2023

What does this PR do?

commit-id:ecb54855


Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

What issue(s) does this change relate to?

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)

Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

Should we do this everywhere...? Can we just use a replace tool on entire codebase...?

@b-chu
Copy link
Contributor Author

b-chu commented Nov 9, 2023

Yes, but incremental changes seem safer? If someone wants to take up the lift of doing it on the entire codebase and validating, I'm happy to close the PR.

@b-chu b-chu requested a review from mvpatel2000 November 9, 2023 16:43
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

LGTM. Fair enough for marginal

Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

Breaks python 3.8 (unit tests will catch when they run)

@mvpatel2000 mvpatel2000 self-requested a review November 9, 2023 23:15
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

Brian claims it works with future

@b-chu b-chu force-pushed the spr/dev/4ea6578b branch 2 times, most recently from 0de8b16 to 3a7d4c6 Compare November 10, 2023 18:44
This PR adds SavePlanner and LoadPlanner from `torch.distributed.checkpoint.planner` into Composer. These parameters are passed in when initializing trainer and are eventually passed to `save_checkpoint` and `load_sharded_checkpoint`. Because planners were implemented in torch 2, there's no type hinting, but type checking happens before the planners are used.

Some minor formatting fixes are included in this PR.

cc: @vchiley

commit-id:4ea6578b
@b-chu b-chu changed the base branch from spr/dev/4ea6578b to dev November 10, 2023 20:37
@b-chu b-chu merged commit cce08e1 into dev Nov 10, 2023
14 checks passed
@b-chu b-chu deleted the spr/dev/ecb54855 branch November 10, 2023 20:37
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