From c9c0ad44221a6716f78e5aaa395e5f47bdc60fa8 Mon Sep 17 00:00:00 2001 From: Ari Brown Date: Thu, 26 Oct 2023 12:13:56 -0400 Subject: [PATCH] finally figured out how to stop dask from erroring out. had to call client.close() --- minerva/cluster.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/minerva/cluster.py b/minerva/cluster.py index 8391a84..9aee493 100644 --- a/minerva/cluster.py +++ b/minerva/cluster.py @@ -104,23 +104,3 @@ class Cluster: return security_group_id - -# Monkeypatch to address a known bug in Dask -# https://github.com/dask/distributed/issues/4305 -from dask.distributed import Future -import sys - -def monkeypatch_del(self): - try: - self.release() - except AttributeError: - # Occasionally we see this error when shutting down the client - # https://github.com/dask/distributed/issues/4305 - if not sys.is_finalizing(): - raise - #pass - except RuntimeError: # closed event loop - pass - -Future.__del__ = monkeypatch_del -