When I try to python the train.py, such error will show up:
Traceback (most recent call last):
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/visdom/__init__.py", line 261, in _send
data=json.dumps(msg),
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, *kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, *kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, *send_kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, *kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('
I have tried to modify the requests.adapters.DEFAULT_RETRIES from 0 to 5, but also set requests.session().keep_alive to False.However it doesn't work.How can I successfully run the train.py?
I also meet this problem . Do you solve it ?
Not yet,I'm going to python another CycleGAN code
Finally I have found the answer!
"start the visdom server before starting the training
python -m visdom.server
"
And the code can run.
Wow锛宻o great ! it works :+1: :smile:
@YushengZhang
start the visdom server before starting the training:
python -m visdom.server
It works! Thanks a lot!
You can also set the --display_id 0 if you don't want to use visdom
python -m visdom.server python train.py
then I start python train.py
It start works!
@hengshanji @YushengZhang @Designbook1 @Matlmr @junyanz
I am facing a similar issue. I do not know how to handle the visdom tool.
Starting the server by python -m visdom.server works (more or less) as expected - no error message, everything starts and I see a blue screen in localhost:8097
However, how should I go on?
I can enter something in the same terminal window (where I started the server) but nothing happens. Should I close it before I can go on?
I am using the docker image provided in the repo.
Sorry for the confusions and thanks a lot in advance!!
You need to create a second terminal and type the training command.
Hi, @junyanz . I follow your steps, start the visdom server before starting the training:
python -m visdom.server , and create a second terminal and type the training command. But I still see a blue screen in localhost:8097, nothing in the screen, just an message "file failed to load:/extension/MathZoom.js" and "file failed to load:/extension/MathMenu.js" in the lower left corner. Could you give me some advice? thanks a lot!
I haven't encountered this issue before. It takes some time to get the first visualization results. Regarding Mathzoom, this post might be relevant.
Thanks for your response! I reinstalled the related dependencies, but I still see a blue screen in localhost:8097 and no navigation bar, like this:

I tried a lot of methods, but it didn't work. I really need your help.
Could you give me some other advice?
I am not sure what has happened. Does it work for other visdom demos? Maybe you can run some example demos in the visdom repo. I am not sure if it is caused by our repo or just visdom issues. If you post your question on visdom repo, more people might be able to know what's going on.
ok, thanks a lot! Currently, I still can't solve this visdom problem. If I don't use visdom, will I miss the relevant training information? For example: loss curve, etc. Can I get training information in other ways?
Yes, the training results and losses are stored in the directory specified by --checkpoints_dir.
I'm very graceful for your help. I reinstalled firefox(a more modern version), it works! This appears to be a browser compatibility problem. I'm sorry to bother you.
Good to know. Thanks.
You can also set the --display_id 0 if you don't want to use visdom
It works!
You can also set the --display_id 0 if you don't want to use visdom
It works!
Where to set --display_id 0?
In the training bash script.
I'm struggling with the same problem, but I'm training on a remote GPU cluster where I submit my training script to the job scheduler. Therefore, I cannot start up multiple terminals and run the Visdom server in some other terminal. Any advice how to proceed? I want to view the results locally using port forwarding, which is all set up.
Most helpful comment
Finally I have found the answer!
"start the visdom server before starting the training
python -m visdom.server
"
And the code can run.