Skip to content

Run tests/unit/model_parallelism in the modal GPU workflow - #8284

Closed
delock wants to merge 1 commit into
masterfrom
ci/model-parallelism-gpu-workflow
Closed

Run tests/unit/model_parallelism in the modal GPU workflow#8284
delock wants to merge 1 commit into
masterfrom
ci/model-parallelism-gpu-workflow

Conversation

@delock

@delock delock commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

What this does

tests/unit/model_parallelism was never executed in PR CI:

  • cpu-torch-latest collects it but skips every test: the whole directory is multi-rank DistributedTest (world_size 2/4), and DistributedExec._launch_procs (tests/unit/common.py) skips them because a CPU runner reports device_count() == 1.
  • modal-torch-latest (2xL40S GPU) has the devices to run them, but its diff-driven selector only considered tests/unit/v1.

This came to light in #8241, whose regression test for #8231 (TestAutoTPMultipleModels) is in that directory and therefore ran nowhere in CI.

Changes

  • ci/tests_fetcher.py: add tests/unit/model_parallelism to the modal workflow test_scopes.
  • ci/torch_latest.py: derive _TEST_FILE_RE and the all-mode selection check from the workflow's test_scopes (imported from tests_fetcher) instead of hardcoding tests/unit/v1, so the selector and the validator share one source of truth.
  • ci/test_torch_latest.py: update the self-tests for the two-scope reality (all-mode selection content, a model_parallelism subset target, new invalid cases, count= assertion).

Validation

  • python3 ci/test_tests_fetcher.py — 16/16 passed
  • python3 ci/test_torch_latest.py — 20/20 passed
  • End-to-end locally: with a scratch commit touching deepspeed/module_inject/tp_shard.py, ci/tests_fetcher.py --workflow modal-torch-latest selects all 6 model_parallelism test files (mode=subset, 45 targets), and ci/torch_latest.py validate-selection --mode subset accepts the list.

Notes

  • The collect-tests job checks out the base revision of the CI scripts (pull_request_target), so this only takes effect for other PRs once it lands on master; this PR's own run validates the selection plumbing but will still select v1-only tests for its own diff.
  • tp_size=4 tests will still be skipped on the 2-GPU modal sandbox via the existing device-count gate; world_size=2 tests (including TestAutoTPMultipleModels) will run for real.

The modal-torch-latest workflow only selected tests under tests/unit/v1,
while every test in tests/unit/model_parallelism is a multi-rank
DistributedTest that the CPU workflow skips via its device-count gate,
so the directory was never executed in PR CI at all.

Add the directory to the modal test scopes and derive the controller's
target validation and all-mode check from the same scope list so the
selector and the validator cannot drift apart.

Signed-off-by: Guokai Ma <guokai.ma@intel.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ac9b67f85

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ci/tests_fetcher.py
WorkflowConfig(
name="modal-torch-latest",
test_scopes=("tests/unit/v1", ),
test_scopes=("tests/unit/v1", "tests/unit/model_parallelism"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the required commit sign-off

This is a non-merge commit, but its message has no Signed-off-by trailer. Please recreate the commit with --signoff so it satisfies the repository's mandatory commit policy.

AGENTS.md reference: AGENTS.md:L8-L8

Useful? React with 👍 / 👎.

@delock
delock requested review from sfc-gh-truwase and removed request for sfc-gh-truwase August 21, 2026 09:42
@sfc-gh-truwase

Copy link
Copy Markdown
Collaborator

@delock please move tests/unit/model_parallelism to tests/unit/v1/autotp. We are using tests/unit/v1 for tests to preserve.

@delock

delock commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Closing in favor of the simpler path: moved tests/unit/model_parallelism to tests/unit/v1/autotp in #8241 (delock/deepspeed@123912f), since tests/unit/v1 is already the modal GPU workflow's selection scope and the tests-to-preserve tree. The xpu workflow path was updated to match. No CI-scope changes needed anymore.

@delock

delock commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

@sfc-gh-truwase Done — moved to tests/unit/v1/autotp in #8241 (commit 123912f), closing this in favor of that.

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.

2 participants