Skip to content
Snippets Groups Projects

Better defaults for .adapt method

Merged Tiago de Freitas Pereira requested to merge dask-defaults into master
3 files
+ 28
5
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -14,6 +14,14 @@ Q_1DAY_IO_BIG_SPEC = {
n_jobs = 16
cluster = SGEIdiapCluster(sge_job_spec=Q_1DAY_IO_BIG_SPEC)
cluster.scale(n_jobs)
cluster.scale(1)
# Adapting to minimim 1 job to maximum 48 jobs
# interval: Milliseconds between checks from the scheduler
# wait_count: Number of consecutive times that a worker should be suggested for
# removal before we remove it.
# Here the goal is to wait 2 minutes before scaling down since
# it is very expensive to get jobs on the SGE grid
cluster.adapt(minimum=1, maximum=n_jobs, wait_count=120, interval=1000)
dask_client = Client(cluster)
Loading