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

Add Support for Non-primitive types in TensorboardLogger #1130

Merged
merged 11 commits into from
Mar 14, 2020
Merged

Add Support for Non-primitive types in TensorboardLogger #1130

merged 11 commits into from
Mar 14, 2020

Conversation

monney
Copy link
Contributor

@monney monney commented Mar 12, 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?

Implements suggestions from #1095 . Specifically makes it so TensoboardLogger converts non-primitive types to strings before logging, and maintains original types in hparams.

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 🙃

@Borda Borda added the feature Is an improvement or enhancement label Mar 13, 2020
@Borda Borda added this to the 0.7.2 milestone Mar 13, 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.

good approach, pls have look at my comments 🤖

  • pls add note to changelog...

pytorch_lightning/loggers/tensorboard.py Outdated Show resolved Hide resolved
pytorch_lightning/loggers/tensorboard.py Outdated Show resolved Hide resolved
pytorch_lightning/loggers/tensorboard.py Outdated Show resolved Hide resolved
@monney monney changed the title Add Support for Non-primitive types in TensorboardLogger [WIP] Add Support for Non-primitive types in TensorboardLogger Mar 13, 2020
@pep8speaks
Copy link

pep8speaks commented Mar 13, 2020

Hello @monney! Thanks for updating this PR.

Line 70:101: E501 line too long (105 > 100 characters)
Line 79:101: E501 line too long (112 > 100 characters)

Comment last updated at 2020-03-14 01:29:42 UTC

monney and others added 2 commits March 13, 2020 19:46
Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>
@monney monney changed the title [WIP] Add Support for Non-primitive types in TensorboardLogger Add Support for Non-primitive types in TensorboardLogger Mar 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.

LGTM 🚀

pytorch_lightning/loggers/base.py Outdated Show resolved Hide resolved
@Borda Borda added the ready PRs ready to be merged label Mar 14, 2020
@S-aiueo32 S-aiueo32 mentioned this pull request Mar 14, 2020
5 tasks
@williamFalcon williamFalcon merged commit da61398 into Lightning-AI:master Mar 14, 2020
tullie pushed a commit to tullie/pytorch-lightning that referenced this pull request Apr 3, 2020
…I#1130)

* Added support for non-primitive types to tensorboard logger

* added EOF newline

* PEP8

* Updated CHANGELOG for PR Lightning-AI#1130. Moved _sanitize_params to base logger. Cleaned up _sanitize_params

* Updated CHANGELOG for PR Lightning-AI#1130. Moved _sanitize_params to base logger. Cleaned up _sanitize_params

* changed convert_params to static method

* PEP8

* Cleanup Doctest for _sanitize_params

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

* Removed OrderedDict import

* Updated import order to conventions

Co-authored-by: Manbir Gulati <manbirgulati@Manbirs-MBP.hsd1.md.comcast.net>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
@Borda Borda modified the milestones: v0.7., 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
feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants