How to use Tensorboard with PyTorch?

username: pyscorcher
cooked: <p>I’m using the conda package manager: I installed pytorch the recommended way using</p>
<pre><code class="lang-auto">conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
</code></pre>
<p>Now I tried to use tensorboard. I tried both</p>
<p><a href="https://anaconda.org/conda-forge/tensorboard" class="onebox" target="_blank" rel="nofollow noopener">https://anaconda.org/conda-forge/tensorboard</a></p>
<p>and</p>
<p><a href="https://anaconda.org/anaconda/tensorboard" class="onebox" target="_blank" rel="nofollow noopener">https://anaconda.org/anaconda/tensorboard</a></p>
<p>the first one installs version 1.14 which gives me “FutureWarning” errors, while the second one installs version 2.0 (which is also the version that is installed when using pip) but gives me a “Unable to reload accumulator” error. How do I correctly install tensorboard in conda?</p>

username: albanD
cooked: <p>Hi,</p>
<p>Tensorboard is now builtin with pytorch. See the doc: <a href="https://pytorch.org/docs/stable/tensorboard.html">https://pytorch.org/docs/stable/tensorboard.html</a></p>

username: pyscorcher
cooked: <p>Thanks for your answer: Yes, some part is, but as far as I understand we still need to install something external to to display the summary files - in the link you provided it says</p>
<blockquote>
<p>This can then be visualized with TensorBoard, which should be installable and runnable with:</p>
<pre><code class="lang-auto">pip install tensorboard
tensorboard --logdir=runs
</code></pre>
</blockquote>
<p>Are you saying that it is <em>not</em> necessary to do that even if you want to display the results?</p>

username: albanD
cooked: <p>Right, you need that for the visualization.<br>
It is very unexpected that <code>pip install tensorboard</code> does not work for you. Can you give more informations about the error?</p>

username: pyscorcher
cooked: <p>I’m using <code>conda</code> - not <code>pip</code> - as my package manager. With the first version (from <code>conda-forge</code>) I get the old version (1.14) of tensorboard which gives me these “FutureWarning” errors, I think from numpy. While it works it seems it is not gonna be supported for much longer.</p>
<p>That is why I tried to use the new version (2.0, which is the same version you currently get with <code>pip</code>, so I expected it is gonna behave the same), but I got the error mentioned. Now yesterday this package was updated again and after installing the new updated package (still version 2.0) the error disappeared, so I guess it must have been an error on their side.</p>
<p>Thanks for answering anyway!</p>

username: mgloria
cooked: <p>Hi <a class="mention" href="/u/pyscorcher">@pyscorcher</a> and <a class="mention" href="/u/alband">@albanD</a>, this solution does not work for me. I have torch version 1.2.0 and installed with conda tensorboard 2.0.2. I am running on Sagemaker conda_pytorch_p36. I also followed this stackoverflow <a href="https://stackoverflow.com/questions/58686400/can-not-get-pytorch-working-with-tensorboard" rel="nofollow noopener">question</a>.</p>
<pre><code class="lang-auto">from torch.utils.tensorboard import SummaryWriter
</code></pre>
<p>returns the following error:</p>
<pre><code class="lang-auto">TypeError: __new__() got an unexpected keyword argument 'serialized_options'

</code></pre>
<p>Any suggestions? Somebody solved this issue? I am losing hope <img src="https://discuss.pytorch.org/images/emoji/apple/frowning_face.png?v=9" title=":frowning_face:" class="emoji" alt=":frowning_face:"></p>

username: pyscorcher
cooked: <p>If you uninstall tensorboard (and just have pytorch installed), do you still get this error? As long as you don’t run tensorboard I don’t think this is what is causing your error (so I guess this is the wrong thread to ask this), as <code>SummaryWriter</code> is part of pytorch itself. As always I recommend starting with a fresh installation with the bare minimum you need.<br>
Maybe protobuf is your problem? <a href="https://stackoverflow.com/questions/50338968/objectdetecionapi-typeerror-new-got-an-unexpected-keyword-argument-seria" rel="nofollow noopener">https://stackoverflow.com/questions/50338968/objectdetecionapi-typeerror-new-got-an-unexpected-keyword-argument-seria</a></p>

username: mgloria
cooked: <p>It seems tensorboad needs to be installed. I tried downgrading protobuf to version 3.6.0 but the issue remained</p>