Can't use Queues w/ `processes=False`
See original GitHub issueGoal: Share a few small queues between tasks under various Client configurations.
Issue: Using distributed 1.22.0
,
from dask.distributed import Client, Queue
client = Client(processes=False)
q = Queue()
def put():
q.put(55)
def get():
print(q.get())
fut = client.submit(put)
res = client.submit(get)
results in
Traceback (most recent call last):
File ".../python3.6/site-packages/distributed/queues.py", line 261, in __setstate__
assert client.address == address
AttributeError: 'Client' object has no attribute 'address'
...
File ".../python3.6/site-packages/distributed/comm/core.py", line 178, in _raise
raise IOError(msg)
OSError: Timed out trying to connect to 'inproc://10.0.0.41/16785/7' after 10 s: connect() didn't finish in time
This works as intended when processes=True
. I also can’t use queue.Queue
because it won’t be pickleable, so I was hoping dask.distributed.Queue
would allow me to work around that.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Wait queues – CS 161 doc
Processes often wait for external events. Your editor waits for key presses; your browser waits for interactions (and/or animations); web servers wait for ......
Read more >Python - Multiprocessing Queue not returning result in correct ...
The main issue with your code is that you're expecting to start workers and collect results in one loop. Forget about it whenever...
Read more >17.2. multiprocessing — Process-based parallelism
Returns a process shared queue implemented using a pipe and a few locks/semaphores. When a process first puts an item on the queue...
Read more >Cuda error · Issue #664 · dbolya/yolact - GitHub
In my project, I use ' torch.set_default_tensor_type('torch.cuda. ... A process won't hang when putting into a queue; ] # for more details.
Read more >To Queue Or Not To Queue - Medium
The software that runs your operating system has its own queues of processes that have to run at any given time. But, generally,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Possibly resolved in https://github.com/dask/distributed/pull/2221
This is also the sort of thing for which it would be nice to have an explicit Semaphore object. There is https://github.com/dask/distributed/issues/2007 if you ever feel like diving into the guts of the distributed scheduler. It’s a decent entry issue.
Replicated. Thanks for the minimal bug report Chris. I’ll take a look.
I’m also curious, what is your intended application here?
On Wed, Aug 29, 2018 at 1:30 PM, Chris White notifications@github.com wrote: