cars.orchestrator.cluster.local_dask_cluster

Contains functions for local dask Cluster

Module Contents

Classes

LocalDaskCluster

LocalDaskCluster

Functions

start_local_cluster(nb_workers[, timeout, ...])

Start a local cluster

stop_local_cluster(cluster, client)

Stop a local cluster

class cars.orchestrator.cluster.local_dask_cluster.LocalDaskCluster(conf_cluster, out_dir, launch_worker=True)

Bases: cars.orchestrator.cluster.abstract_dask_cluster.AbstractDaskCluster

LocalDaskCluster

check_conf(conf)

Check configuration

Parameters

conf (dict) – configuration to check

Returns

overloaded configuration

Return type

dict

start_dask_cluster()

Start dask cluster

cleanup()

Cleanup cluster

cars.orchestrator.cluster.local_dask_cluster.start_local_cluster(nb_workers, timeout=600, activate_dashboard=False)

Start a local cluster

Parameters
  • nb_workers (int) – Number of dask workers

  • timeout (int) – Connection timeout

Returns

Local cluster and Dask client

Return type

(dask.distributed.LocalCluster, dask.distributed.Client) tuple

cars.orchestrator.cluster.local_dask_cluster.stop_local_cluster(cluster, client)

Stop a local cluster

Parameters
  • cluster (dask.distributed.LocalCluster) – Local cluster

  • client (dask.distributed.Client) – Dask client