DaskLocalCluster

class propertyestimator.backends.dask.DaskLocalCluster(number_of_workers=1, resources_per_worker=<propertyestimator.backends.backends.ComputeResources object>)[source]

A property estimator backend which uses a dask LocalCluster object to run calculations on a single machine.

See also

dask.LocalCluster

__init__(number_of_workers=1, resources_per_worker=<propertyestimator.backends.backends.ComputeResources object>)[source]

Constructs a new DaskLocalCluster

Methods

__init__([number_of_workers, …])

Constructs a new DaskLocalCluster

start()

Start the calculation backend.

stop()

Stop the calculation backend.

submit_task(function, *args, **kwargs)

Submit a task to the compute resources managed by this backend.

Attributes

started

Returns whether this backend has been started yet.

start()[source]

Start the calculation backend.

submit_task(function, *args, **kwargs)[source]

Submit a task to the compute resources managed by this backend.

Parameters

function (function) – The function to run.

Returns

Returns a future object which will eventually point to the results of the submitted task.

Return type

Future

property started

Returns whether this backend has been started yet.

Type

bool

stop()

Stop the calculation backend.