chainer / chainercv

ChainerCV: a Library for Deep Learning in Computer Vision
MIT License
1.48k stars 304 forks source link

pickle error.. using chainercv with chainermn #262

Closed MannyKayy closed 7 years ago

MannyKayy commented 7 years ago

Hi,

I am trying to use chainercv with chainermn.

I used chainercv with some of my new projects and when i attempt to distribute training using chainermn, I receive the following error from the scatter_dataset method. All i am doing is applying a random_flip transform to the training data. I get the error for all my projects that use chainercv and have replicated it using the chainermn mnist example file .

image

I'm not sure as to where to raise this issue so I have raised it in both the chainercv and chainermn repos.

yuyu2172 commented 7 years ago

The error occurred because function objects can not be pickled. We will look into a way to fix this issue. Thank you very much for reporting.

yuyu2172 commented 7 years ago

Hi. Sorry for the late reply. Since pickling is the issue, can you put the transform function outside of the main function?

A function can be picklable as long as it is not declared inside another function.