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

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:

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

And then, I run two traning simultaneously (but separately from different linux terminal windows), and then I got a picture like this:

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.

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?

Thanks.

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

Thanks, looks like I have to change envs and window names. I cannot start two visdom server.

or else I will get the following error message:

Intel MKL FATAL ERROR: Cannot load home/.local/lib/python3.10/site-packages/torch/lib/libtorch_cpu.so.

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.

I don’t think the error message is raised by visdom and I can also successfully create multiple visdom servers by changing the port.
Using the same port would give this error in the second launch:

# 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

Thanks.

I can start 2 visdoms, but when I start 2 pytorch training, it will all go into the first visdom?

How to assign the second job to the second visdom server? Thanks.