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

BUG - Wandb: Sanitize callable. #4320

Merged
merged 12 commits into from
Oct 26, 2020
Merged

BUG - Wandb: Sanitize callable. #4320

merged 12 commits into from
Oct 26, 2020

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Oct 23, 2020

What does this PR do?

This PR add sanitisation for Trainer.add_argparse_args which could be function.

Behaviour:

  • Try to call the function. If it fails, replace by function name.

Fixes #4276

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 your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

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 Oct 23, 2020

Hello @tchaton! Thanks for updating this PR.

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

Comment last updated at 2020-10-26 11:22:31 UTC

@mergify mergify bot requested a review from a team October 23, 2020 11:03
@tchaton tchaton added bug Something isn't working logger Related to the Loggers labels Oct 23, 2020
@tchaton tchaton added this to the 1.0.x milestone Oct 23, 2020
@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #4320 into master will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #4320   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         111     111           
  Lines        8049    8063   +14     
======================================
+ Hits         7469    7483   +14     
  Misses        580     580           

CHANGELOG.md Outdated Show resolved Hide resolved
pytorch_lightning/loggers/base.py Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team October 23, 2020 20:08
pytorch_lightning/loggers/base.py Show resolved Hide resolved
@@ -138,3 +138,4 @@ mlruns/
*.ckpt
pytorch\ lightning
test-reports/
wandb
Copy link
Member

Choose a reason for hiding this comment

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

how it happens that this folder is created?

Copy link
Contributor

Choose a reason for hiding this comment

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

wandb logger always makes this folder, we can't avoid this. I have it too. I think it's ok to add it to gitignore.

@mergify mergify bot requested a review from a team October 23, 2020 20:14
@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2020

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

return val.__name__
return _val
except Exception:
return val.__name__
Copy link
Contributor

Choose a reason for hiding this comment

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

see #4380, not all objects have __name__
maybe we need __class__.__name__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logger Related to the Loggers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WandbLogger fails in 1.0.2 due to non-JSON serializable object
6 participants