Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't pickle <type 'instancemethod'> when using python's multiprocessing Pool.map() #17

Open
titipata opened this issue May 14, 2016 · 4 comments

Comments

@titipata
Copy link
Owner

This error found by @bluenex and related to this Stack overflow post.

@daniel-acuna
Copy link
Collaborator

Good catch! I think I had the same error once. When does this happen?

@titipata
Copy link
Owner Author

When using python 2.7. People in Stack Overflow suggested to use pathos.

@daniel-acuna
Copy link
Collaborator

I would go with pathos. Where are you getting the error? Can you share code to reproduce the error?

@titipata
Copy link
Owner Author

Here is code that gives error. Note that I do a quick fix in 50f7019

from science_concierge import preprocess
from multiprocessing import Pool

df = pd.read_csv('pubmed_oa_2016.csv')
docs = list(df.abstract)
pool = Pool()
docs_preprocess = pool.map(preprocess, docs)

This error is gone after I installed pathos i.e.

pip install git+https://github.com/uqfoundation/pathos.git@master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants