forked from bellwether/minerva
finally figured out how to stop dask from erroring out. had to call client.close()
This commit is contained in:
parent
937ca168ad
commit
c9c0ad4422
1 changed files with 0 additions and 20 deletions
|
|
@ -104,23 +104,3 @@ class Cluster:
|
||||||
|
|
||||||
return security_group_id
|
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
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue