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

Remove nivida/apex #16149

Merged
merged 3 commits into from
Dec 21, 2022
Merged

Remove nivida/apex #16149

merged 3 commits into from
Dec 21, 2022

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Dec 21, 2022

What does this PR do?

See title

Does your PR introduce any breaking changes? If yes, please list them.

Removes apex support

cc @justusschock @awaelchli @Borda @carmocca

@carmocca carmocca added refactor breaking change Includes a breaking change precision: apex (removed) NVIDIA/apex precision labels Dec 21, 2022
@carmocca carmocca added this to the v1.9 milestone Dec 21, 2022
@carmocca carmocca self-assigned this Dec 21, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Dec 21, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2022

⚡ Required checks status: All passing 🟢

Groups summary

🟢 pytorch_lightning: Tests workflow
Check ID Status
pl-cpu (macOS-11, pytorch, 3.8, 1.11) success
pl-cpu (macOS-11, pytorch, 3.9, 1.12) success
pl-cpu (macOS-11, pytorch, 3.10, 1.13) success
pl-cpu (macOS-11, pytorch, 3.8, 1.10, oldest) success
pl-cpu (ubuntu-20.04, pytorch, 3.8, 1.10) success
pl-cpu (ubuntu-20.04, pytorch, 3.9, 1.11) success
pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.12) success
pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.13) success
pl-cpu (ubuntu-20.04, pytorch, 3.7, 1.10, oldest) success
pl-cpu (windows-2022, pytorch, 3.9, 1.11) success
pl-cpu (windows-2022, pytorch, 3.10, 1.12) success
pl-cpu (windows-2022, pytorch, 3.10, 1.13) success
pl-cpu (windows-2022, pytorch, 3.7, 1.10, oldest) success
pl-cpu (slow, macOS-11, pytorch, 3.7, 1.11) success
pl-cpu (slow, ubuntu-20.04, pytorch, 3.7, 1.11) success
pl-cpu (slow, windows-2022, pytorch, 3.7, 1.11) success
pl-cpu (macOS-11, lightning, 3.8, 1.13) success
pl-cpu (ubuntu-20.04, lightning, 3.8, 1.13) success
pl-cpu (windows-2022, lightning, 3.8, 1.13) success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py, tests/tests_pytorch/deprecated_api/test_remove_1-10.py, tests/tests_pytorch/helpers/runif.py, tests/tests_pytorch/models/test_amp.py, tests/tests_pytorch/models/test_hooks.py, tests/tests_pytorch/models/test_horovod.py, tests/tests_pytorch/plugins/precision/test_deepspeed_precision.py, tests/tests_pytorch/plugins/test_amp_plugins.py, tests/tests_pytorch/strategies/test_deepspeed_strategy.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py, tests/tests_pytorch/trainer/optimization/test_manual_optimization.py, tests/tests_pytorch/utilities/test_imports.py.

🟢 pytorch_lightning: Azure GPU
Check ID Status
pytorch-lightning (GPUs) success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py, tests/tests_pytorch/deprecated_api/test_remove_1-10.py, tests/tests_pytorch/helpers/runif.py, tests/tests_pytorch/models/test_amp.py, tests/tests_pytorch/models/test_hooks.py, tests/tests_pytorch/models/test_horovod.py, tests/tests_pytorch/plugins/precision/test_deepspeed_precision.py, tests/tests_pytorch/plugins/test_amp_plugins.py, tests/tests_pytorch/strategies/test_deepspeed_strategy.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py, tests/tests_pytorch/trainer/optimization/test_manual_optimization.py, tests/tests_pytorch/utilities/test_imports.py.

🟢 pytorch_lightning: Azure HPU
Check ID Status
pytorch-lightning (HPUs) success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py, tests/tests_pytorch/deprecated_api/test_remove_1-10.py, tests/tests_pytorch/helpers/runif.py, tests/tests_pytorch/models/test_amp.py, tests/tests_pytorch/models/test_hooks.py, tests/tests_pytorch/models/test_horovod.py, tests/tests_pytorch/plugins/precision/test_deepspeed_precision.py, tests/tests_pytorch/plugins/test_amp_plugins.py, tests/tests_pytorch/strategies/test_deepspeed_strategy.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py, tests/tests_pytorch/trainer/optimization/test_manual_optimization.py, tests/tests_pytorch/utilities/test_imports.py.

🟢 pytorch_lightning: Azure IPU
Check ID Status
pytorch-lightning (IPUs) success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py, tests/tests_pytorch/deprecated_api/test_remove_1-10.py, tests/tests_pytorch/helpers/runif.py, tests/tests_pytorch/models/test_amp.py, tests/tests_pytorch/models/test_hooks.py, tests/tests_pytorch/models/test_horovod.py, tests/tests_pytorch/plugins/precision/test_deepspeed_precision.py, tests/tests_pytorch/plugins/test_amp_plugins.py, tests/tests_pytorch/strategies/test_deepspeed_strategy.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py, tests/tests_pytorch/trainer/optimization/test_manual_optimization.py, tests/tests_pytorch/utilities/test_imports.py.

🟢 pytorch_lightning: Docs
Check ID Status
make-doctest (pytorch) success
make-html (pytorch) success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py.

🟢 pytorch_lightning: Docker
Check ID Status
build-cuda (3.9, 1.10, 11.3.1) success
build-cuda (3.9, 1.11, 11.3.1) success
build-cuda (3.9, 1.12, 11.6.1) success
build-cuda (3.9, 1.13, 11.6.1) success
build-hpu (1.5.0, 1.11.0) success
build-ipu (3.9, 1.10) success
build-NGC success
build-pl (3.9, 1.10, 11.3.1) success
build-pl (3.9, 1.11, 11.3.1) success
build-pl (3.9, 1.12, 11.6.1) success
build-pl (3.9, 1.13, 11.6.1) success
build-xla (3.7, 1.12) success

These checks are required after the changes to dockers/base-cuda/Dockerfile, environment.yml.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py.

🟢 install
Check ID Status
install-pkg (ubuntu-22.04, app, 3.7) success
install-pkg (ubuntu-22.04, app, 3.10) success
install-pkg (ubuntu-22.04, fabric, 3.7) success
install-pkg (ubuntu-22.04, fabric, 3.10) success
install-pkg (ubuntu-22.04, pytorch, 3.7) success
install-pkg (ubuntu-22.04, pytorch, 3.10) success
install-pkg (ubuntu-22.04, lightning, 3.7) success
install-pkg (ubuntu-22.04, lightning, 3.10) success
install-pkg (ubuntu-22.04, notset, 3.7) success
install-pkg (ubuntu-22.04, notset, 3.10) success
install-pkg (macOS-12, app, 3.7) success
install-pkg (macOS-12, app, 3.10) success
install-pkg (macOS-12, fabric, 3.7) success
install-pkg (macOS-12, fabric, 3.10) success
install-pkg (macOS-12, pytorch, 3.7) success
install-pkg (macOS-12, pytorch, 3.10) success
install-pkg (macOS-12, lightning, 3.7) success
install-pkg (macOS-12, lightning, 3.10) success
install-pkg (macOS-12, notset, 3.7) success
install-pkg (macOS-12, notset, 3.10) success
install-pkg (windows-2022, app, 3.7) success
install-pkg (windows-2022, app, 3.10) success
install-pkg (windows-2022, fabric, 3.7) success
install-pkg (windows-2022, fabric, 3.10) success
install-pkg (windows-2022, pytorch, 3.7) success
install-pkg (windows-2022, pytorch, 3.10) success
install-pkg (windows-2022, lightning, 3.7) success
install-pkg (windows-2022, lightning, 3.10) success
install-pkg (windows-2022, notset, 3.7) success
install-pkg (windows-2022, notset, 3.10) success

These checks are required after the changes to src/pytorch_lightning/loops/optimization/optimizer_loop.py, src/pytorch_lightning/plugins/__init__.py, src/pytorch_lightning/plugins/precision/__init__.py, src/pytorch_lightning/plugins/precision/apex_amp.py, src/pytorch_lightning/plugins/precision/deepspeed.py, src/pytorch_lightning/plugins/precision/native_amp.py, src/pytorch_lightning/strategies/deepspeed.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, src/pytorch_lightning/trainer/connectors/checkpoint_connector.py, src/pytorch_lightning/trainer/trainer.py, src/pytorch_lightning/utilities/__init__.py, src/pytorch_lightning/utilities/enums.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

@carmocca carmocca mentioned this pull request Dec 21, 2022
Comment on lines +296 to +297
if "amp_scaling_state" in self._loaded_checkpoint:
rank_zero_warn("This checkpoint contains apex AMP data, but apex support has been removed.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fine with me either way. I thought having a warning could be useful

Copy link
Contributor

@awaelchli awaelchli Dec 21, 2022

Choose a reason for hiding this comment

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

Alternatively we could also have a migration that removes the key and warns that this state gets dropped. This would keep the main code base clean and move the "legacy" code to the migration utilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaving this for a follow-up

@mergify mergify bot added the ready PRs ready to be merged label Dec 21, 2022
@carmocca carmocca merged commit e544676 into lite/debug Dec 21, 2022
@carmocca carmocca deleted the remove/apex branch December 21, 2022 11:15
Borda pushed a commit that referenced this pull request Dec 22, 2022
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 4, 2023
carmocca added a commit that referenced this pull request Jan 11, 2023
carmocca added a commit that referenced this pull request Jan 11, 2023
carmocca added a commit that referenced this pull request Jan 17, 2023
carmocca added a commit that referenced this pull request Jan 17, 2023
carmocca added a commit that referenced this pull request Jan 17, 2023
carmocca added a commit that referenced this pull request Jan 17, 2023
carmocca added a commit that referenced this pull request Jan 17, 2023
carmocca added a commit that referenced this pull request Jan 17, 2023
Borda pushed a commit that referenced this pull request Jan 18, 2023
Borda pushed a commit that referenced this pull request Jan 18, 2023
@carmocca carmocca modified the milestones: v1.9, 2.0 Jan 19, 2023
carmocca added a commit that referenced this pull request Jan 19, 2023
carmocca added a commit that referenced this pull request Jan 19, 2023
carmocca added a commit that referenced this pull request Jan 19, 2023
carmocca added a commit that referenced this pull request Jan 19, 2023
carmocca added a commit that referenced this pull request Jan 19, 2023
carmocca added a commit that referenced this pull request Jan 19, 2023
lantiga pushed a commit that referenced this pull request Jan 19, 2023
lantiga pushed a commit that referenced this pull request Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Includes a breaking change pl Generic label for PyTorch Lightning package precision: apex (removed) NVIDIA/apex precision ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants