How could 2 separatedly running visdom data merged into 1 picture?

SouthTorch: <p>I ran two LeNet5 training on different datasets, one is MNIST, the other is CIFAR10, the code is the same except dimensions, including the visdom related codes being the same, like:</p>
<pre><code class="lang-auto">viz=Visdom()
viz.line([0.], [0.], win='train_loss', opts=dict(title='Train Loss'))
viz.line([0.], [0.], win='val', opts=dict(title='Validation Accuracy'))
global_step=0
</code></pre>
<p>And then, I run two traning simultaneously (but separately from different linux terminal windows), and then I got a picture like this:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/a/bae2dafb7eec658f553f3aed075a3d5122b69801.png" data-download-href="https://discuss.pytorch.org/uploads/default/bae2dafb7eec658f553f3aed075a3d5122b69801" title="Screenshot_2022-06-21_08-47-07"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/a/bae2dafb7eec658f553f3aed075a3d5122b69801_2_556x499.png" alt="Screenshot_2022-06-21_08-47-07" data-base62-sha1="qFgQo0N7p2ySNY0auniTBjRVVxT" width="556" height="499" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/a/bae2dafb7eec658f553f3aed075a3d5122b69801_2_556x499.png, https://discuss.pytorch.org/uploads/default/optimized/3X/b/a/bae2dafb7eec658f553f3aed075a3d5122b69801_2_834x748.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/b/a/bae2dafb7eec658f553f3aed075a3d5122b69801.png 2x" data-dominant-color="F3F7FA"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot_2022-06-21_08-47-07</span><span class="informations">1010×908 102 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Initially, I am wandering why the accuracy fluctuate like that, soon later I realized it is the accuracy from two runnings, one is around 50% accuracy, and the other is around 90% accuracy. The same phenomena happend for loss data.</p>
<p>How could they be merged into one picture? Is that a bug? Shouldn’t the two runnings create two visdom instances? And then create two sets of pictures?</p>
<p>Thanks.</p>

ptrblck: <p>I guess you are creating a single <code>visdom</code> server and might be using the same environment with the same window names, which would then write to the same plots.<br>
Try to create separate envs and select the one you want to see in visdom directly.</p>

SouthTorch: <p>Thanks, looks like I have to change envs and window names. I cannot start two visdom server.</p>
<p>or else I will get the following error message:</p>
<pre><code class="lang-auto">Intel MKL FATAL ERROR: Cannot load home/.local/lib/python3.10/site-packages/torch/lib/libtorch_cpu.so.
</code></pre>
<p>I think visdom should change its behavior, don’t you think so? It should let two different code create different instances and generate two sets of visuals. That is more convenient for coders.</p>

ptrblck: <p>I don’t think the error message is raised by <code>visdom</code> and I can also successfully create multiple <code>visdom</code> servers by changing the <code>port</code>.<br>
Using the same <code>port</code> would give this error in the second launch:</p>
<pre><code class="lang-python"># 1st server
visdom
Checking for scripts.
It's Alive!
ERROR:root:initializing
INFO:root:Application Started
You can navigate to http://localhost:8097

# 2nd server
visdom
Checking for scripts.
It's Alive!
ERROR:root:initializing
OSError: [Errno 98] Address already in use

# 2nd server using another port
visdom -p 8880
Checking for scripts.
It's Alive!
ERROR:root:initializing
INFO:root:Application Started
You can navigate to http://localhost:8880
</code></pre>

SouthTorch: <p>Thanks.</p>
<p>I can start 2 visdoms, but when I start 2 pytorch training, it will all go into the first visdom?</p>
<p>How to assign the second job to the second visdom server? Thanks.</p>