Skip to content

Fix worker count env parsing#5558

Merged
rapids-bot[bot] merged 7 commits into
rapidsai:mainfrom
fallintoplace:fix-wait-for-workers-num-workers
Jul 14, 2026
Merged

Fix worker count env parsing#5558
rapids-bot[bot] merged 7 commits into
rapidsai:mainfrom
fallintoplace:fix-wait-for-workers-num-workers

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

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.

@ChuckHastings ChuckHastings added bug Something isn't working non-breaking Non-breaking change python labels Jul 13, 2026
Comment thread mg_utils/wait_for_workers.py Outdated
Comment thread scripts/dask/wait_for_workers.py Outdated
@ChuckHastings

Copy link
Copy Markdown
Collaborator

/okay to test 21ceb39

Comment thread mg_utils/wait_for_workers.py Outdated
Comment thread scripts/dask/wait_for_workers.py Outdated
@ChuckHastings

Copy link
Copy Markdown
Collaborator

/ok to test b1fd420

@alexbarghi-nv alexbarghi-nv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alexbarghi-nv

Copy link
Copy Markdown
Member

/merge

@rapids-bot
rapids-bot Bot merged commit 78e3adf into rapidsai:main Jul 14, 2026
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants