Feat: Enhance device compatibility with Lightning Trainer API#490
Open
yishutu wants to merge 6 commits intojwohlwend:mainfrom
Open
Feat: Enhance device compatibility with Lightning Trainer API#490yishutu wants to merge 6 commits intojwohlwend:mainfrom
yishutu wants to merge 6 commits intojwohlwend:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to improve device compatibility within the project, aligning with the
devicesargument specifications of the PyTorch Lightning Trainer API.Previously, device handling might have been less flexible. With these updates, the project now better supports the various inputs for the
devicesparameter as described in the Lightning Trainer Class API, including:devices=1for a single GPU)devices=[0, 1]for specific GPUs)Note on TPU Usage:
When using TPUs with the Lightning Trainer, the
devicesargument is typically limited to specific options. Valid configurations for TPUs often include:devices=1(for a single TPU core)devices='auto'(for automatic detection of available TPU cores)devices='<all tpu>'(to use all available TPU cores)devices=[0, 1]if applicable for your setup).These changes aim to make device configuration more robust and user-friendly, ensuring seamless integration with PyTorch Lightning's device management.
For reference, see the Lightning Trainer Class API - Devices