Open alex4321 opened 7 years ago
+1 Same problem. Polyglot patch pickle behaviour on initialization that results in continues problems from another places with pickle. Like in our case with joblib
| raise self._value
worker_1 | File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 431, in _handle_tasks
worker_1 | put(task)
worker_1 | File "/usr/local/lib/python3.7/site-packages/joblib/pool.py", line 158, in send
worker_1 | CustomizablePickler(buffer, self._reducers).dump(obj)
worker_1 | File "/usr/local/lib/python3.7/site-packages/polyglot/utils.py", line 43, in _pickle_method
worker_1 | func_name = method.im_func.__name__
worker_1 | File "/usr/local/lib/python3.7/site-packages/polyglot/utils.py", line 43, in _pickle_method
AttributeError: ‘function’ object has no attribute ‘im_func’
+1 I have same problem. @alex4321 's suggestion is going well on our environment.
In mine case I have next module:
So now I'm trying to run it inside sklearn cross-validation:
And I getted next exception:
As I can see - _pickle_method written for python2 (due to usage of method.im_func / method.im_self / method.im_class) and need few changes: