Skip to content

Fix worker count env parsing#5558

Open
fallintoplace wants to merge 1 commit into
rapidsai:mainfrom
fallintoplace:fix-wait-for-workers-num-workers
Open

Fix worker count env parsing#5558
fallintoplace wants to merge 1 commit into
rapidsai:mainfrom
fallintoplace:fix-wait-for-workers-num-workers

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • Cast the NUM_WORKERS environment fallback to int in both wait_for_workers.py copies.
  • Report an argparse error when NUM_WORKERS is set to a non-integer value.

Why

--num-expected-workers is parsed as an integer, but the environment fallback kept NUM_WORKERS as a string. When the CLI option was omitted and NUM_WORKERS was set, the worker-count check compared num_workers < num_expected_workers as int < str and raised TypeError.

Validation

  • python3 -m py_compile scripts/dask/wait_for_workers.py mg_utils/wait_for_workers.py
  • Smoke-tested both scripts with a temporary dask.distributed.Client stub and NUM_WORKERS=16.
  • Smoke-tested both scripts with NUM_WORKERS=abc to confirm argparse exits with a clear error.

@copy-pr-bot

copy-pr-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant