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

simulation, add max_calls arg to ray.remote to avoid rayidle in gpus #1384

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/py/flwr/simulation/ray_transport/ray_client_proxy.py
Expand Up @@ -91,7 +91,7 @@ def reconnect(
return common.DisconnectRes(reason="") # Nothing to do here (yet)


@ray.remote
@ray.remote(max_calls=1)
def launch_and_get_properties(
client_fn: ClientFn, cid: str, get_properties_ins: common.GetPropertiesIns
) -> common.GetPropertiesRes:
Expand All @@ -100,7 +100,7 @@ def launch_and_get_properties(
return client.get_properties(get_properties_ins)


@ray.remote
@ray.remote(max_calls=1)
def launch_and_get_parameters(
client_fn: ClientFn, cid: str, get_parameters_ins: common.GetParametersIns
) -> common.GetParametersRes:
Expand All @@ -109,7 +109,7 @@ def launch_and_get_parameters(
return client.get_parameters(get_parameters_ins)


@ray.remote
@ray.remote(max_calls=1)
def launch_and_fit(
client_fn: ClientFn, cid: str, fit_ins: common.FitIns
) -> common.FitRes:
Expand All @@ -118,7 +118,7 @@ def launch_and_fit(
return client.fit(fit_ins)


@ray.remote
@ray.remote(max_calls=1)
def launch_and_evaluate(
client_fn: ClientFn, cid: str, evaluate_ins: common.EvaluateIns
) -> common.EvaluateRes:
Expand Down