RhodiumGroup / docker_images

Docker images for Rhodium's jupyterlab deployments
2 stars 2 forks source link

Cluster won't scale down #72

Closed delgadom closed 5 years ago

delgadom commented 5 years ago

Scaling using the widget has no effect, and calling cluster.scale(n) # n < cluster size, including 0 results in the following:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-48-63c9907b662c> in <module>()
----> 1 cluster.scale(0)

/opt/conda/lib/python3.6/site-packages/dask_kubernetes/core.py in scale(self, n)
    371                     return
    372 
--> 373             to_close = select_workers_to_close(self.scheduler, n_to_delete)
    374             logger.debug("Closing workers: %s", to_close)
    375             if len(to_close) < len(self.scheduler.workers):

/opt/conda/lib/python3.6/site-packages/dask_kubernetes/core.py in select_workers_to_close(scheduler, n_to_close)
    536     assert n_to_close <= len(workers)
    537     key = lambda ws: ws.info['memory']
--> 538     to_close = set(sorted(scheduler.idle, key=key)[:n_to_close])
    539 
    540     if len(to_close) < n_to_close:

/opt/conda/lib/python3.6/site-packages/dask_kubernetes/core.py in <lambda>(ws)
    535     workers = list(scheduler.workers.values())
    536     assert n_to_close <= len(workers)
--> 537     key = lambda ws: ws.info['memory']
    538     to_close = set(sorted(scheduler.idle, key=key)[:n_to_close])
    539 

AttributeError: info

This occurs on v0.2.4 images, and appears to be fixed in dask/dask-kubernetes#104

delgadom commented 5 years ago

closed by #73