You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using from ray.util.multiprocessing import Pool, I cannot pass a Queue to pool.apply_async. However, if from multiprocessing import Pool is used, there's no problem.
from multiprocessing import Process, Manager
from ray.util.multiprocessing import Pool
def async_evaluate(number, unevaluated_queue, evaluated_queue):
print("entered async_evaluate")
while True:
sol = unevaluated_queue.get(block=True, timeout=None)
# objective1.eval(sol)
evaluated_queue.put(sol, block=True, timeout=None)
unevaluated_queue = Manager().Queue()
evaluated_queue = Manager().Queue()
pool = Pool()
pool.apply_async(func=async_evaluate, args=(666, unevaluated_queue, evaluated_queue,))
As above, I'm sure that some processes are started, but print("entered async_evaluate") is not executed. The problem is that these codes can be run correctly in Pool class of multiprocessing. Is there anything wrong(BUG) with Pool class in Ray?
The text was updated successfully, but these errors were encountered:
When using
from ray.util.multiprocessing import Pool
, I cannot pass a Queue to pool.apply_async. However, iffrom multiprocessing import Pool
is used, there's no problem.As above, I'm sure that some processes are started, but
print("entered async_evaluate")
is not executed. The problem is that these codes can be run correctly in Pool class of multiprocessing. Is there anything wrong(BUG) with Pool class in Ray?The text was updated successfully, but these errors were encountered: