ska_sdp_batchlet.utils.dask_cluster.factory module
- class ska_sdp_batchlet.utils.dask_cluster.factory.DaskClusterFactory[source]
Bases:
objectA factory class which returns a new instance of a SpecCluster based dask cluster instance.
- static get_cluster(dask_params)[source]
Create and return a dask cluster based on the execution environment.
The selection logic is as follows:
If inside a slurm job allocation, return
DaskSlurmClusterElse, return a
DaskLocalCluster.
- Parameters:
dask_params (
dict) -- User provided dask parameters. Given to batchlet as json input, in the key "dask_params".- Return type:
- Returns:
Cluster instance which inherits
SpecCluster.