Closed christopherbate closed 5 years ago
I think having option to choose backend for tensorboard is not a good idea, since those two are expected to do same thing in the same way.
Can you change the logic for selecting writer in the visualization.py
to
tensorboardX
(since builtin tensorboard is now in beta)torch.utils.tensorboard
when (1) failsand revert the tensorboard part of config.json
as before?
The remaining changes looks nice. Thank you for contribution, @christopherbate.
@SunQpark Will take a look tonight, thanks.
Also just wanted to note that the logic you specified is currently how it works. So the only change you want is for the user to not be able to change the priority ordering of tensorboardX vs. torch.utils.tensorboard and force the priority order to be 1) tensorboardX and then 2) torch.utils.tensorboard?
So the only change you want is for the user to not be able to change the priority ordering of tensorboardX vs. torch.utils.tensorboard and force the priority order to be 1) tensorboardX and then 2) torch.utils.tensorboard?
It's not because this functionality is not needed, but because it should be somewhere else than the config file. I think the config file should be as simple as possible, holding configurations about experiments only. Few people will want to change backend for visualization and they will have no problem doing that on the source code.
I have made some local commits about this issue, will upload these if you don't mind.
OK, sounds good.
My changes are now uploaded here. Please check these and comment.
This pull request adds the ability to choose to use PyTorch 1.1's
torch.util.tensorboard.SummaryWriter
. The config is changed so that the user passes in an array of modules names. If tensorboardX is not available, it tries to usetorch.utils.tensorboard
. The user can switch the ordering to change priority.Tested with the default example using Pytorch 1.1 and Tenorboard 1.14. Also updated Readme to reflect requirements.