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

Improved docs for Loggers #1484

Merged
merged 40 commits into from
Apr 16, 2020
Merged

Improved docs for Loggers #1484

merged 40 commits into from
Apr 16, 2020

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Apr 14, 2020

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

What does this PR do?

A continuation of a series of doc improvements. Follows #1389, #1370, #1483

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@pep8speaks
Copy link

pep8speaks commented Apr 14, 2020

Hello @awaelchli! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-04-16 13:19:02 UTC

@mergify mergify bot requested a review from a team April 14, 2020 06:57
@Borda Borda added the docs Documentation related label Apr 14, 2020
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

Great work!

not sure but I think that doctest in RST files are not executed, so there is no need of converting them here

pytorch_lightning/loggers/mlflow.py Show resolved Hide resolved
pytorch_lightning/loggers/comet.py Show resolved Hide resolved
pytorch_lightning/loggers/trains.py Show resolved Hide resolved
@mergify mergify bot requested a review from a team April 14, 2020 07:14
@awaelchli
Copy link
Contributor Author

@Borda
Good point about doctest. I was wondering.
I can run it locally like this for example:
python -m doctest docs/source/experiment_logging.rst
Maybe we could add it to CI like this?
I will check the links you posted.

@Borda
Copy link
Member

Borda commented Apr 14, 2020

Maybe we could add it to CI like this?

sure add it to CI :]

@mergify mergify bot requested a review from a team April 14, 2020 08:30
@awaelchli
Copy link
Contributor Author

awaelchli commented Apr 14, 2020

Hey @jakubczakon do you know how I could make the doctest pass in online mode without complaining about an invalid api key?

api_key="ANONYMOUS" doesn't seem to work, and I noticed the tests use api_key="test" but for some reason that doesn't work in doctests.

@jakubczakon
Copy link
Contributor

Hi @awaelchli,

I think the reason could be:

  • the project is not specified correctly. api_token="ANONYMOUS" works for some projects in the "shared" organization. We need to add that project by hand. That said "shared/pytorch-lightning-integration" is working.
  • you are using an older version of neptune-client that doesn't yet have "ANONYMOUS" token hardcoded -> updating the project should fix it

Also, the fact that api_token="test" works in offline mode is because in offline mode nothing gets sent to Neptune so no token is checked etc.

Could you please paste the particular piece of code that is causing the problem?

@awaelchli
Copy link
Contributor Author

@jakubczakon AWESOME. Your tipp with the version update did the trick! I didn't see it fail locally because I had the new version and the CI tests with minimal requirements.
Thanks for your help!!

@awaelchli
Copy link
Contributor Author

@Borda The doctest extension is already in conf.py. It can be run with make doctest. If I do locally, I get many import errors. Let's maybe fix it in another PR?

@Borda
Copy link
Member

Borda commented Apr 14, 2020

sounds fair to do it extra PR... I would maybe run in pytest then sphinx...

UPDATE: #1511

@mergify
Copy link
Contributor

mergify bot commented Apr 15, 2020

This pull request is now in conflict... :(

@codecov
Copy link

codecov bot commented Apr 15, 2020

Codecov Report

Merging #1484 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #1484   +/-   ##
======================================
  Coverage      91%     91%           
======================================
  Files          67      67           
  Lines        3754    3754           
======================================
  Hits         3408    3408           
  Misses        346     346           

@mergify
Copy link
Contributor

mergify bot commented Apr 15, 2020

This pull request is now in conflict... :(

@Borda
Copy link
Member

Borda commented Apr 16, 2020

@awaelchli rebase to master shall fix it...
unfortunately I cannot do it for you...
graphql error: 'Could not resolve to a PullRequest with the number of 1599.'

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

add tests of RST files in GH action and CircleCI

pytorch_lightning/loggers/mlflow.py Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team April 16, 2020 12:07
@awaelchli
Copy link
Contributor Author

@Borda about RST files: could I do that in another PR? on master "make doctest" has many errors (including RST) that would need to be solved and I think it would be better to do in another PR. What do you think?
#1484 (comment)

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

so pls make it an issue linked to #714 so we do not forget...
because now it seems as these examples shall be tested (because they are formatted as doctest) but in fact, they are not... lol

@Borda Borda added the ready PRs ready to be merged label Apr 16, 2020
@Borda Borda added this to the 0.7.4 milestone Apr 16, 2020
@mergify mergify bot requested a review from a team April 16, 2020 12:48
@awaelchli
Copy link
Contributor Author

I already added a note in #714 as a reminder 2 days ago.
and the tests that I added here in rst I tested locally, with "make doctest docs/source/file.rst"

@williamFalcon williamFalcon merged commit 6e1d72d into Lightning-AI:master Apr 16, 2020
@awaelchli awaelchli mentioned this pull request Apr 16, 2020
5 tasks
@awaelchli awaelchli deleted the docs/improve_loggers branch April 24, 2020 01:03
tullie pushed a commit to tullie/pytorch-lightning that referenced this pull request Jun 7, 2020
* improve __init__

* improve logger base

* improve comet logger docs

* improved docs for mlflow

* improved nepune logger docs

* fix matplotlib import issue

* improve tensorboard docs

* improve docs for test tube

* improved trains logger docs

* improve wandb logger docs

* improved docs in experiment_logging.rst

* added MLflow to the list of loggers

* fix too long lines

* fix trains doctest

* fix neptune doctest

* fix mlflow doctest

* Apply suggestions from code review

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* Apply suggestions from code review

* fix whitespace

* try bypass mode for neptune (fix doctest api key error)

* try "test" as api key

* Revert "try "test" as api key"

This reverts commit fd77db2.

* try test as api key

* update neptune docs

* bump neptune minimal version

* revert unnecessary bypass code

* test if CI runs doctests in .rst files

* Revert "test if CI runs doctests in .rst files"

This reverts commit a45aeb4.

* add doctest directive

* neptune demo links

* added tutorial link for W&B

* fix line too long

* fix merge error

* fix merge error

* add instructions how to install loggers

* add instructions how to install the loggers

* hide _abc_impl property from docs

* review Borda, 4 spaces

* indentation in example sections

* blank

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
@Borda Borda modified the milestones: 0.7.4, v0.7.x Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants