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

Move device parser utility function #10230

Merged
merged 5 commits into from
Nov 5, 2021
Merged

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Oct 28, 2021

What does this PR do?

Addresses comment #9987 (comment)

The Trainer and Lite share a device parsing logic. We can move this static method out of Trainer and place it where the rest of the device parsing lives. This way, Lite does not need to import the Lightning Trainer.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)
    Changelog not needed, the function was protected/internal

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

I made sure I had fun coding 🙃

Part of #1 (it's a lie, this is just here to avoid noisy GitHub bot)

@awaelchli awaelchli changed the base branch from master to lightning-lite/lite-core October 28, 2021 20:56
@awaelchli awaelchli changed the title device parser utility function Move device parser utility function Oct 28, 2021
@awaelchli awaelchli mentioned this pull request Oct 28, 2021
23 tasks
@awaelchli awaelchli added this to the v1.5 milestone Oct 28, 2021
Base automatically changed from lightning-lite/lite-core to master October 29, 2021 21:46
@awaelchli awaelchli force-pushed the lightning-lite/device-parser branch from de42e8b to 49697ac Compare October 29, 2021 22:41
@awaelchli awaelchli added the fabric lightning.fabric.Fabric label Oct 30, 2021
@awaelchli awaelchli marked this pull request as ready for review October 30, 2021 12:08
@awaelchli awaelchli modified the milestones: v1.5, v1.6 Nov 1, 2021
Copy link
Contributor

@kaushikb11 kaushikb11 left a comment

Choose a reason for hiding this comment

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

@awaelchli We had discussed to keep the Trainer method, and use the utility function inside it

@awaelchli
Copy link
Contributor Author

Changed

@mergify mergify bot added the ready PRs ready to be merged label Nov 4, 2021
@justusschock justusschock enabled auto-merge (squash) November 5, 2021 09:30
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@justusschock justusschock merged commit 348fc4b into master Nov 5, 2021
@justusschock justusschock deleted the lightning-lite/device-parser branch November 5, 2021 10:18
Raalsky pushed a commit to neptune-ai/pytorch-lightning that referenced this pull request Nov 23, 2021
* move parser function to utils

* fix types

* keep static method

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fabric lightning.fabric.Fabric ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants