allennlp icon indicating copy to clipboard operation
allennlp copied to clipboard

Feature request: log entire config to tensorboard as text field

Open epwalsh opened this issue 5 years ago • 5 comments

:exclamation: NOTE: implementing this feature kind of depends on this bug in tensorboardX being resolved: https://github.com/lanpa/tensorboardX/issues/345

Is your feature request related to a problem? Please describe. My TensorBoard gets really crowded as I often make multiple runs of the same config after making slight alterations. It then becomes difficult to figure out exactly which parameters are associated with each run unless you actually create a separate config for each small change (do-able but annoying) or record each change in a git commit (also annoying).

Describe the solution you'd like It would really convenient if we could view the configs directly in TB. This can be done, in theory, by logging them as text fields. I have a branch where I've hacked this together: https://github.com/epwalsh/allennlp/tree/log-config. Unfortunately the bug with tensorboardX prevents this from working as of now. So I suppose we could just wait to see if that gets resolved or find another method.

epwalsh avatar Mar 19 '19 18:03 epwalsh

This would be cool! @matt-gardner mentioned wanting this just the other day, actually. Could you ping this issue when the underlying bug is resolved? Contributions are most certainly welcome...

brendan-ai2 avatar Mar 20 '19 00:03 brendan-ai2

@brendan-ai2 will do!

epwalsh avatar Mar 20 '19 15:03 epwalsh

Another potential solution would be to use PyTorch's tensorboard interface, instead of tensorboardX. See https://github.com/pytorch/pytorch/releases/tag/v1.1.0. Or maybe with the upcoming trainer callbacks refactoring we could also provide a callback for the config, allowing the user to get it into Tensorboard with whatever method works for them.

epwalsh avatar May 06 '19 20:05 epwalsh

Hi, As FYI, I have exposed writer.flush() in https://github.com/lanpa/tensorboardX/commit/e9323109eab780a7444508e95f9d3a49e1f4f59f

lanpa avatar Jun 18 '19 18:06 lanpa

@lanpa thanks for the update! I will check it out

epwalsh avatar Jun 18 '19 18:06 epwalsh