Closed yisj closed 5 years ago
Hey, I suspect it will work if you do
import torrequest
and then in get_last_page_num
, use torrequest.TorRequest
, instead of importing TorRequest
as in
from torrequest import TorRequest
This is a known limitation of cloudpickle
, the library we use for serialization. It cannot handle from ... import Class
if Class
is not pickleable.
If this doesn't work, can you share one entry of the stocks
list so I can try to run the script?
Thank you so much for your comment! No more TypeError. My code is in https://github.com/fitdark/crawl-krx-data.git
Interesting... I got the same pickling error. The case is that I have a function that contains a ThreadPool
. If I import the function using from
and put that function inside a ray.remote
function, I got the _thread.lock
pickling error. But if I import the function using direct import
, it works fine!
Is this documented somewhere?
Traceback (most recent call last):
File "/home/wen/Desktop/nas-echinos/Ray_train_best.py", line 233, in
It seems because that I use the SummaryWriter
System information
Describe the problem
I want to use TorRequest(https://github.com/erdiaker/torrequest) in remote function. When I define remote function without TorRequest, it works fine. But when I use TorRequest method in ray remote function, I get error "TypeError: can't pickle _thread.lock objects".
Source code / logs