io_loop error when running Dask Actors on SGECluster
See original GitHub issueWhat happened:
Getting an error when trying to submit an Actor to a client started with an SGECluster
cluster.
Using example code found here. Works fine with a LocalCluster
. I get an io_loop
error when running with an SGECluster
.
Error:
AttributeError: type object 'Counter' has no attribute '_io_loop'
What you expected to happen: I expect the Dask Actor to work on an SGECluster
Minimal Complete Verifiable Example:
Example:
class Counter:
""" A simple class to manage an incrementing counter """
n = 0
def __init__(self):
self.n = 0
def increment(self):
self.n += 1
return self.n
def add(self, x):
self.n += x
return self.n
future = client.submit(Counter, actor=True) # Create a Counter on a worker
counter = future.result()
counter.add(1)
Error:
AttributeError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 counter.add(1)
211 return _OK(result["result"])
212 return _Error(result["exception"])
--> 214 actor_future = ActorFuture(io_loop=self._io_loop)
216 async def wait_then_set_result():
217 actor_future._set_result(await run_actor_function_on_worker())
187 else:
188 return attr
--> 190 attr = getattr(self._cls, key)
192 if callable(attr):
194 @functools.wraps(attr)
195 def func(*args, **kwargs):
AttributeError: type object 'Counter' has no attribute '_io_loop'
Anything else we need to know?:
Environment:
- Dask version: 2022.5.0
- Dask-jobqueue: 0.7.3
- Python version: 3.8.13
- Operating System: CentOs
- Install method (conda, pip, source): conda
Issue Analytics
- State:
- Created a year ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Cancelling task waiting on event breaks tornado #3908 - GitHub
The task to cancel silently. Minimal Complete Verifiable Example: Run on jupyter lab 2.1.4, on a cell block. PS: does not produce error...
Read more >dask_jobqueue.SGECluster - Dask-Jobqueue
A dask.distributed security object if you're using TLS/SSL. If True, temporary self-signed credentials will be created automatically. scheduler_optionsdict.
Read more >Futures - Dask documentation
Once an actor is running on a worker it is forever tied to that worker. If that worker becomes overburdened or dies, then...
Read more >API — Dask.distributed 2022.12.1 documentation
Run a benchmark on the workers for memory, disk, and network bandwidths ... Whether these tasks should exist on the worker as stateful...
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
@jacobtomlinson fixed
@graingert I think I fixed it! I had set
set_as_default=False
when starting my Client. I set that to True and now it does setActor._client.io_loop
. Thanks for the help ! You pointed me to some code that allowed me to debug that further