superduperdb.backends.ray package#


superduperdb.backends.ray.compute module#

class superduperdb.backends.ray.compute.RayComputeBackend(address: str | None = None, local: bool = False, **kwargs)[source]#

Bases: ComputeBackend

A client for interacting with a ray cluster. Initialize the ray client.

  • address – The address of the ray cluster.

  • local – Set to True to create a local Dask cluster. (optional)

  • **kwargs

    Additional keyword arguments to be passed to the ray client.

disconnect() None[source]#

Disconnect the ray client.

property name: str#

Return the name of current compute engine

result(identifier: str) Any[source]#

Retrieves the result of a previously submitted task. Note: This will block until the future is completed.


identifier – The identifier of the submitted task.

shutdown() None[source]#

Shuts down the ray cluster.

submit(function: Callable, *args, **kwargs) ObjectRef[source]#

Submits a function to the ray server for execution.


function – The function to be executed.

property tasks: Dict[str, ObjectRef]#

List all pending tasks

property type: str#

Return the type of compute engine

wait(identifier: str) None[source]#

Waits for task corresponding to identifier to complete. :param identifier: Future task id to wait

wait_all() None[source]#

Waits for all tasks to complete.

Module contents#