Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions dask_jobqueue/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from distributed.utils import tmpfile, ignoring, get_ip_interface, parse_bytes
from distributed import LocalCluster
from distributed.deploy import Cluster

dirname = os.path.dirname(sys.executable)

Expand All @@ -16,7 +17,7 @@


@docstrings.get_sectionsf('JobQueueCluster')
class JobQueueCluster(object):
class JobQueueCluster(Cluster):
""" Base class to launch Dask Clusters for Job queues

This class should not be used directly, use inherited class appropriate
Expand Down Expand Up @@ -153,10 +154,6 @@ def start_workers(self, n=1):
def scheduler(self):
return self.cluster.scheduler

@property
def scheduler_address(self):
return self.cluster.scheduler_address

def _calls(self, cmds):
""" Call a command using subprocess.communicate

Expand Down Expand Up @@ -223,15 +220,3 @@ def __enter__(self):
def __exit__(self, type, value, traceback):
self.stop_workers(self.jobs)
self.cluster.__exit__(type, value, traceback)

def adapt(self):
""" Start up an Adaptive deployment if not already started

This makes the cluster request resources in accordance to current
demand on the scheduler """
from distributed.deploy import Adaptive
if self._adaptive:
return
else:
self._adaptive = Adaptive(self.scheduler, self, startup_cost=5,
key=lambda ws: ws.host)
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributed>=1.21.3
docrep
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
url='https://github.com/dask/dask-jobqueue',
license='BSD 3-Clause',
packages=['dask_jobqueue'],
install_requires=open('requirements.txt').read().strip().split('\n'),
long_description=(open('README.rst').read() if exists('README.rst') else ''),
install_requires=['docrep'],
zip_safe=False)