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

Ray: Fix RayExecutor to fail when num_workers=0 and num_hosts=None #3210

Merged
merged 1 commit into from Oct 11, 2021
Merged
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
6 changes: 3 additions & 3 deletions horovod/ray/runner.py
Expand Up @@ -218,12 +218,12 @@ def __init__(
cpus_per_worker = cpus_per_slot
gpus_per_worker = gpus_per_slot

if num_workers is None and num_hosts is None:
raise ValueError("Either `num_workers` or `num_hosts` must be "
if not (num_workers or num_hosts):
raise ValueError("One of `num_workers` or `num_hosts` must be "
"set.")

if num_workers and num_hosts:
raise ValueError("Both `num_workers` and `num_hosts` cannot be "
raise ValueError("Only one of `num_workers` and `num_hosts` must be "
"set.")

if gpus_per_worker and not use_gpu:
Expand Down