DaskLocalCluster

class openff.evaluator.backends.dask.DaskLocalCluster(number_of_workers=1, resources_per_worker=ComputeResources())[source]

An openff-evaluator 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=ComputeResources())[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.