Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local mode in ray #1612

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions superduperdb/backends/ray/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ class RayComputeBackend(ComputeBackend):
A client for interacting with a ray cluster. Initialize the ray client.

:param address: The address of the ray cluster.
:param local: Set to True to create a local Dask cluster. (optional)
:param **kwargs: Additional keyword arguments to be passed to the ray client.
"""

def __init__(
self,
address: t.Optional[str] = None,
local: bool = False,
**kwargs,
):
self._futures_collection: t.Dict[str, ray.ObjectRef] = {}

ray.init(address=address, **kwargs)
if local:
ray.init()
else:
ray.init(address=address, **kwargs)

@property
def type(self) -> str:
Expand Down