Pickling error running CytoselfFullTrainer
sheryllin111 opened this issue · comments
The error can be avoided by removing parallel processing from the dataloader like shown in the example below:
from cytoself.datamanager.opencell import DataManagerOpenCell
data_ch = ['pro', 'nuc']
datapath = 'Testdata' # path to download sample data
DataManagerOpenCell.download_sample_data(datapath) # donwload data
datamanager = DataManagerOpenCell(datapath, data_ch, fov_col=None)
datamanager.const_dataloader(batch_size=32, num_workers=1, label_name_position=1)
datamanager.train_loader.num_workers=0
datamanager.val_loader.num_workers=0
datamanager.test_loader.num_workers=0
Thank you @gitclipp for finding a solution. This seems a specific problem on windows. I have no problem running it on Ubuntu, and I do have problem of Can't pickle on windows. I've also seen issues on multiprocessing when running pytorch on windows. There might be some compatibility issues between recent python's multiprocessing and windows.