taesungp / contrastive-unpaired-translation

Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
https://taesung.me/ContrastiveUnpairedTranslation/
Other
2.24k stars 418 forks source link

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

Open c1a1o1 opened 3 years ago

c1a1o1 commented 3 years ago

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

csm-kr commented 3 years ago

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.

c1a1o1 commented 3 years ago

Thanks very much!

stestagg commented 2 years ago

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

Alex-GZ commented 2 years ago

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.