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

Wandb Flatten Dict #2458

Closed
anthonytec2 opened this issue Jul 2, 2020 · 3 comments · Fixed by #2459
Closed

Wandb Flatten Dict #2458

anthonytec2 opened this issue Jul 2, 2020 · 3 comments · Fixed by #2459
Labels
bug Something isn't working help wanted Open to be worked on logger Related to the Loggers

Comments

@anthonytec2
Copy link
Contributor

Wandb logger should flatten the dictionary of parameters before logging. Every other logger has the bellow pattern of code:

 params = self._convert_params(params)
 params = self._flatten_dict(params)

🐛 Bug

Wandb logger does not flatten parameters resulting in dictionaries being logged to Wandb, which are not searchable causing for some loss of features in wandb.

To Reproduce

Run the cpu_template with wandb logger, and log a nested dictionary.

Expected behavior

Solution, just call params = self._flatten_dict(params) this in the wandb logger.

Environment

  • CUDA:
    • GPU:
    • available: False
    • version: None
  • Packages:
    • numpy: 1.18.5
    • pyTorch_debug: False
    • pyTorch_version: 1.5.0
    • pytorch-lightning: 0.8.4
    • tensorboard: 2.2.2
    • tqdm: 4.46.1
  • System:
    • OS: Darwin
    • architecture:
      • 64bit
    • processor: i386
    • python: 3.7.7
    • version: Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
@anthonytec2 anthonytec2 added bug Something isn't working help wanted Open to be worked on labels Jul 2, 2020
@awaelchli
Copy link
Member

image

Is this what you mean?
I agree, it would be nice if we could flatten that out.

@anthonytec2
Copy link
Contributor Author

Exactly, this commit will make hparams look like:

Screen Shot 2020-07-06 at 7 08 59 AM

@awaelchli
Copy link
Member

perfect!

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

Successfully merging a pull request may close this issue.

3 participants