contrastive-unpaired-translation icon indicating copy to clipboard operation
contrastive-unpaired-translation copied to clipboard

AttributeError: Can't pickle local object 'Visdom.setup_socket.<locals>.run_socket'

Open c1a1o1 opened this issue 3 years ago • 4 comments

AttributeError: Can't pickle local object 'Visdom.setup_socket..run_socket'

c1a1o1 avatar Mar 10 '21 08:03 c1a1o1

Hi, I went through the same situation.

If your OS environment is windows, try changing the default "num_threads" argument to 0 in base_option.py in the options folder.

csm-kr avatar Mar 22 '21 16:03 csm-kr

Thanks very much!

c1a1o1 avatar Mar 23 '21 03:03 c1a1o1

For reference, @csm-kr 's suggestion also applies to MacOS (Monterey, 12.3.1, with python 3.10.3)

stestagg avatar Apr 28 '22 10:04 stestagg

Just comment out line 18 at train.py (opt.visualizer = visualizer). It seems not to be used anywhere but it does force pytorch multiprocessing to try to pickle the visualizer, since the dataset object has an opt object reference.

Using a single thread instead can hurt performance.

Alex-GZ avatar Jul 02 '22 16:07 Alex-GZ