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

Standalone Lite: Remaining Utilities #14492

Merged
merged 95 commits into from
Sep 7, 2022
Merged

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Sep 2, 2022

What does this PR do?

This PR moves many utilities that are needed for LightningLite in the standalone package.

Reviewer:

Most of the 200+ files are import changes under src/pytorch_lightning. You can skip them in the review and focus on the these items listed here (use the file browser navigation tab):

  • src/lightning_lite/utilities: All utilities that are related directly to LightningLite, Acclerator, Strategy, etc. were moved here. Subsequent PRs that move the rest of the code will depend on these utilities being in place.
  • src/pytorch_lightning/utilities: Public utilities that were moved receive a deprecation treatment
  • tests/tests_lite/helpers: A subset of testing utils have been copied over from PL
  • tests/tests_lite/utilities: Tests corresponding to moved functions have been moved here
  • tests/tests_pytorch/utilities: All code removed here has moved to the corresponding files in tests/tests_lite/utilities

Notes

  • TODO(lite) markers have been added for minor things that need to be resolved in subsequent iterations.
  • There are a handful of mypy and flake type errors that we will ignore for now until the rest of the code base gets moved to the right places. TODO(lite) notes have been added.
  • There are even more utils that could eventually move to Lite. For now, I'm only picking the ones that are needed to make Lite standalone for the feature set it provides today. Eventually more strategies would move and with it more utils.

cc @Borda @justusschock @awaelchli @rohitgr7 @carmocca @akihironitta

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Sep 2, 2022
@awaelchli awaelchli changed the base branch from master to refactor/lightning-lite/main September 2, 2022 00:25
@awaelchli awaelchli added fabric lightning.fabric.Fabric refactor labels Sep 2, 2022
@awaelchli awaelchli marked this pull request as ready for review September 2, 2022 08:39
@awaelchli awaelchli added this to the pl:1.8 milestone Sep 2, 2022
@awaelchli awaelchli changed the base branch from refactor/lightning-lite/main to lite/main September 2, 2022 09:29
@awaelchli awaelchli self-assigned this Sep 2, 2022
@Borda Borda self-requested a review September 2, 2022 09:33
src/lightning_lite/utilities/__init__.py Show resolved Hide resolved
src/lightning_lite/utilities/imports.py Outdated Show resolved Hide resolved
src/pytorch_lightning/core/mixins/device_dtype_mixin.py Outdated Show resolved Hide resolved
src/pytorch_lightning/utilities/apply_func.py Outdated Show resolved Hide resolved
src/pytorch_lightning/utilities/cloud_io.py Show resolved Hide resolved
src/pytorch_lightning/utilities/seed.py Show resolved Hide resolved
src/pytorch_lightning/utilities/xla_device.py Outdated Show resolved Hide resolved
tests/tests_lite/helpers/runif.py Show resolved Hide resolved
tests/tests_lite/helpers/utils.py Show resolved Hide resolved
tests/tests_lite/helpers/runif.py Outdated Show resolved Hide resolved
tests/tests_lite/helpers/utils.py Outdated Show resolved Hide resolved
src/pytorch_lightning/core/mixins/device_dtype_mixin.py Outdated Show resolved Hide resolved
src/lightning_lite/utilities/imports.py Outdated Show resolved Hide resolved
src/lightning_lite/utilities/imports.py Outdated Show resolved Hide resolved
@awaelchli awaelchli changed the title Standalone Lite Utilities Standalone Lite: Utilities Sep 3, 2022
@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels Sep 7, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Sep 7, 2022
@awaelchli awaelchli enabled auto-merge (squash) September 7, 2022 13:48
@carmocca carmocca self-assigned this Sep 7, 2022
@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels Sep 7, 2022
@awaelchli awaelchli disabled auto-merge September 7, 2022 14:35
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Sep 7, 2022
@awaelchli awaelchli enabled auto-merge (squash) September 7, 2022 14:36
@awaelchli awaelchli merged commit d2459df into master Sep 7, 2022
@awaelchli awaelchli deleted the feature/standalone-lite-utils branch September 7, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package ready PRs ready to be merged refactor
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants