ska_sdp_batchlet.utils.dask_cluster.factory module

class ska_sdp_batchlet.utils.dask_cluster.factory.DaskClusterFactory[source]

Bases: object

A factory class which returns a new instance of a SpecCluster based dask cluster instance.

This factory current supports 2 kinds of clusters: 1. Slurm-based cluster using via DaskSlurmCluster 2. Local cluster using via DaskLocalCluster()

classmethod get_cluster(dask_cluster_params)[source]

Create and return a dask cluster based on the execution environment.

Parameters:

dask_cluster_params (dict) -- User provided dask cluster parameters. These are forwarded as is to the constructor of the dask cluster classes.

Return type:

SpecCluster

Returns:

Cluster instance which inherits SpecCluster.