Initializing a local cluster in Dask takes forever
I’m trying out some things with Dask for the first time, and while I had it running a few weeks ago, I now find that I can’t get the LocalCluster initiated. I’ve cut if off after running 30 minutes at some point, and am unable to get it initiated. Does anybody know what the issue may be? The code I’m trying to run is below, it doesn’t get past the LocalCluster line.
Understanding task stream and speeding up Distributed Dask
class some_class(): def __init__(self,engine_kwargs: dict = None): self.distributed = engine_kwargs.get(“distributed”, False) self.dask_client = None self.n_workers = engine_kwargs.get( “n_workers”, int(os.getenv(“SLURM_CPUS_PER_TASK”, os.cpu_count())) ) @contextmanager def dask_context(self): “””Dask context manager to set up and close down client””” if self.distributed: if self.distributed_mode == “processes”: processes = True dask_cluster = LocalCluster(n_workers=self.n_workers, processes=processes) dask_client = Client(self.dask_cluster) try: yield finally: if dask_client […]