pytorch-lightning
pytorch-lightning copied to clipboard
[App] Application logs in CLI
What does this PR do?
This PR adds CLI command lightning show logs <app_name> [<components>]
that prints logs
Does your PR introduce any breaking changes? If yes, please list them.
We've extended the run_app_in_cloud
context manager to return app_name
as well. This is to enable easier testing, but might also affect other existing tests from different repositories.
Before submitting
- [x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
- [x] Did you read the contributor guideline, Pull Request section?
- [x] Did you make sure your PR does only one thing, instead of bundling different changes together?
- [x] Did you make sure to update the documentation with your changes? (if necessary)
- [x] Did you write any new necessary tests? (not for typos and docs)
- [x] Did you verify new and existing tests pass locally with your changes?
- [x] Did you list all the breaking changes introduced by this pull request?
- [ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)
PR review
Anyone in the community is welcome to review the PR. Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
- [x] Is this pull request ready for review? (if not, please submit in draft mode)
- [ ] Check that all items from Before submitting are resolved
- [x] Make sure the title is self-explanatory and the description concisely explains the PR
- [x] Add labels and milestones (and optionally projects) to the PR so it can be classified
Did you have fun?
Make sure you had fun coding 🙃
cc @borda
is “show” the best command word here? @adam-lightning. how will this generalize as the CLI evolves?
@williamFalcon The idea is that show
would be for showing / displaying / printing all information about given resource(s).
Something like just saying "Show me logs of X", "show me something ...", "show me my application" etc.
Tho, for the future, I'd distinguish the "show" from "list" as one first one answers the question about the object's contents / details, and the other lists the objects we might want to interact with.
Or You mean something else by the CLI evolution ?
that makes sense. i'm just thinking about what else "show" will apply to other than logs
@adam-lightning We should add two things:
- An issue/ticket to create update the docs
- Update changelog
@adam-lightning We should add two things:
- An issue/ticket to create update the docs
- Update changelog
@manskx
- Just create a ticket or also implement it before merging this PR ?
- I haven't found changelog in the existing files. Should I create one?
@adam-lightning We should add two things:
- An issue/ticket to create update the docs
- Update changelog
@manskx
- Just create a ticket or also implement it before merging this PR ?
- I haven't found changelog in the existing files. Should I create one?
Would be nice to update the docs in the same PR :))) up to you
changelog is here: https://github.com/Lightning-AI/lightning/blob/35ec79ad1f75790767a6857637c9bbe052e47b58/src/lightning_app/CHANGELOG.md
@adam-lightning We should add two things:
- An issue/ticket to create update the docs
- Update changelog
@manskx
- Just create a ticket or also implement it before merging this PR ?
- I haven't found changelog in the existing files. Should I create one?
Would be nice to update the docs in the same PR :))) up to you
changelog is here: https://github.com/Lightning-AI/lightning/blob/35ec79ad1f75790767a6857637c9bbe052e47b58/src/lightning_app/CHANGELOG.md
Updated the changelog. But I don't really know how / what to update in docs tbh. Do Yo have any idea @manskx as to what to write and where? I think that adding CLI command and documenting it in CLI is good enough, right ?
@adam-lightning We should add two things:
- An issue/ticket to create update the docs
- Update changelog
@manskx
- Just create a ticket or also implement it before merging this PR ?
- I haven't found changelog in the existing files. Should I create one?
Would be nice to update the docs in the same PR :))) up to you changelog is here: https://github.com/Lightning-AI/lightning/blob/35ec79ad1f75790767a6857637c9bbe052e47b58/src/lightning_app/CHANGELOG.md
Updated the changelog. But I don't really know how / what to update in docs tbh. Do Yo have any idea @manskx as to what to write and where? I think that adding CLI command and documenting it in CLI is good enough, right ?
I think we can create a GH issue to update the docs of this functionality. cc: @tchaton @Felonious-Spellfire
Let's also keep an eye on the e2e CI tests after this gets merged.