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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs with new Lightning Lite usage 1/n #15600

Merged
merged 4 commits into from
Nov 11, 2022
Merged

Conversation

awaelchli
Copy link
Member

@awaelchli awaelchli commented Nov 9, 2022

What does this PR do?

We introduced a new way to interact with Lightning Lite in #14992. The run method approach is no longer the recommended way moving forward.

This first PR focuses on

  • Updates to remove subclassing LightningLite in example code
  • self.x -> lite.x
  • Usage of the CLI

Future PRs will need to

  • Add section on how to run in Jupyter notebook
  • Update the animated GIF

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)

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 馃檭

cc @Borda @carmocca @justusschock @awaelchli

@awaelchli awaelchli added docs Documentation related fabric lightning.fabric.Fabric labels Nov 9, 2022
@awaelchli awaelchli added this to the v1.9 milestone Nov 9, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Nov 9, 2022
@awaelchli awaelchli self-assigned this Nov 9, 2022
@awaelchli awaelchli marked this pull request as ready for review November 9, 2022 12:47
Copy link
Contributor

@carmocca carmocca left a comment

Choose a reason for hiding this comment

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

This effectively forces us to release lite on the next minor release. It would be weird to have it in the docs if we are going to have large breaking changes by changing the names. Is this agreed on?

@Borda
Copy link
Member

Borda commented Nov 9, 2022

cc: @lantiga

@awaelchli
Copy link
Member Author

This PR doesn't change any names or breaks APIs. I'm updating the docs based on what we have in master. Old code will still work. I am quite confused about what the issue here is. Where would you expect this documentation to show up if not here?

@carmocca
Copy link
Contributor

carmocca commented Nov 9, 2022

I'm just saying that since this PR changes the docs to use the new package and imports, then whoever is reading the docs will see this. Right now it's only on the "latest" docs, but not anymore after we make a 1.x release which means that it would be messy to change names after that. This is also related to the motivation in #15586 (comment)

@awaelchli
Copy link
Member Author

Oh I see. I think you mean the changes I made from

:class:~pytorch_lightning.lite.LightningLite
to
:class:~lightning_lite.lite.LightningLite
?
So this is not visible to the user in the docs, as it gets rendered as just LightningLite with a link. The rest of the changes should only be about importing from lightning the main package. If it's just about that, I can also revert that.

@Borda Borda requested a review from lantiga November 11, 2022 09:10
@awaelchli
Copy link
Member Author

Reverted the link changes. Now still points to :class:~pytorch_lightning.lite.LightningLite

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 !

@tchaton tchaton merged commit 8c9b688 into master Nov 11, 2022
@tchaton tchaton deleted the docs/lightning-lite-run branch November 11, 2022 16:43
@mergify mergify bot added the ready PRs ready to be merged label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants