Repository navigation
CI: stop pip check from failing the AWS fallback on deepspeed-kernels - #9020
pengdurice merged 4 commits into
Conversation
Since deepspeedai#8950, modal-torch-latest runs `pip check` after installing DeepSpeed, and the AWS capacity fallback has failed every time since: deepspeed-kernels 0.0.1.dev1698255861 is not supported on this platform The only deepspeed-kernels file on PyPI is named py3-none-manylinux1_x86_64, but the WHEEL metadata inside it says cp38-cp38-linux_x86_64, and the fallback runs Python 3.12. Run `pip check` through a small wrapper that accepts only that line and still fails on every other problem, including a failed check that prints nothing. Also fetch the complete output tail when the prepare phase fails, not only the test phase: the inline output is cut at 24,000 characters, which hid this error from the job log. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: pengdurice <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b174a55a6e
ℹ️ 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".
| problems = [] | ||
| for line in result.stdout.splitlines(): | ||
| name = line.split(" ", 1)[0] | ||
| if name in known_unsupported and line.endswith(" is not supported on this platform"): |
There was a problem hiding this comment.
Restrict the exemption to the known wheel version
The shared Modal/AWS manifest installs this package from the unpinned requirements/requirements-dev.txt:4, but this predicate accepts any version whose line starts with the package name and has the suffix. I checked python -m pip check --help, which defines the command as “Verify installed packages have compatible dependencies”; a simulated deepspeed-kernels 999.0 is not supported on this platform still makes this wrapper exit 0. As soon as PyPI (or a candidate requirements change) supplies another release with a genuinely incompatible wheel, CI bypasses the dependency gate, so match the exact known version/report or validate that wheel rather than exempting the project forever.
Useful? React with 👍 / 👎.
| if line.strip(): | ||
| problems.append(line) | ||
| # A failed check that printed nothing is still a failure. | ||
| raise SystemExit(1 if problems or not result.stdout.strip() else 0) |
There was a problem hiding this comment.
Account for stderr-side pip-check failures
In the shared Modal/AWS wrapper, a nonzero pip check can print the allowed unsupported-wheel line on stdout and an independent failure on stderr, yet this expression exits 0 because problems only contains stdout. I checked the installed pip 26.1 implementation against its --help contract (“Verify installed packages have compatible dependencies”): create_package_set_from_installed() logs malformed dependency metadata as Error parsing dependencies ... on stderr and makes pip check fail; with the allowed stdout line present, that broken metadata is silently accepted. Include stderr-side failures in the allowlist decision.
Useful? React with 👍 / 👎.
Since deepspeedai#8950, modal-torch-latest runs `pip check` after installing DeepSpeed, and the AWS capacity fallback has failed every time: deepspeed-kernels 0.0.1.dev1698255861 is not supported on this platform The package has had no release since 2023-10, and the WHEEL metadata of its only wheel says cp38-cp38-linux_x86_64. Remove it from requirements-dev.txt instead of exempting it from `pip check`, and drop the exemption. No active CI job uses it: the inference-v2 kernel tests are deselected by tests/pytest.ini, and nv-pre-compile-ops builds with DS_BUILD_CUTLASS_OPS=0 and DS_BUILD_RAGGED_DEVICE_OPS=0. The inference-v2 op builders still link its prebuilt libraries when it is installed (DeepSpeed-MII installs it). Keep fetching the complete output tail when the prepare phase fails, so the next prepare failure shows its error in the job log. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: pengdurice <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Maintainer validation is needed because the clean AWS preparation result remains a placeholder, leaving dependency installation and pip check unconfirmed, and neither the live AWS fallback nor Modal was exercised.
No open issues 🎉
What changed in this PR
This PR addresses the AWS fallback’s dependency-check failure by removing deepspeed-kernels from development requirements, while leaving pip check intact. It also improves diagnostics for future preparation failures.
Changes:
- Remove
deepspeed-kernelsfrom development dependencies without changing inference-v2 builders. - Retrieve bounded S3 log tails for failed preparation phases when inline output is truncated.
- Add regression coverage for preparation-failure log retrieval.
| File | Description |
|---|---|
requirements/requirements-dev.txt |
Remove the dependency responsible for the reported platform-check failure. |
ci/torch_latest.py |
Extend failed-phase log-tail retrieval to preparation. |
ci/test_torch_latest.py |
Support preparation logs in the fake AWS client and test tail retrieval. |
Review effort: Balanced
This PR's merge-queue run fell back to AWS (Modal had no GPU within 600 s), and the AWS prepare failed: pip check rejects deepspeed-kernels 0.0.1.dev1698255861, whose wheel is tagged cp38 while the AWS environment runs Python 3.12. The AWS prepare installs the candidate commit's requirements, so removing the line here lets this PR pass the fallback. This is the same one-line change as deepspeedai#9020, which cannot merge until this PR fixes cpu-torch-latest. When deepspeedai#9020 merges after this PR, git sees the same line removed on both sides and merges it without a conflict. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: pengdurice <[email protected]>
CI: drop the abandoned deepspeed-kernels from the dev requirements
Problem
When Modal has no GPU within 600 s,
modal-torch-latestfalls back to AWS. Since #8950 (merged 2026-11-04) that fallback has failed 6 times out of 6 withAwsControllerError: AWS prepare failed with exit code 1, and no tests ran. Five were merge-queue entries whose PRs were not at fault (#8985 twice, #8728, #8612, #8842); one was the scheduled run on master. Examples:Cause
#8950 added
python -m pip checkafter "install candidate DeepSpeed" inbuild_remote_commands. On the AWS environment (uv venv, CPython 3.12.14) it exits 1 with:deepspeed-kernelscomes fromrequirements/requirements-dev.txt. Its only file on PyPI (last release 2023-10-25) is nameddeepspeed_kernels-0.0.1.dev1698255861-py3-none-manylinux1_x86_64.whl, but theWHEELfile inside it saysTag: cp38-cp38-linux_x86_64. pip installs by the file name (any Python 3) andpip checkchecks the internal tag (Python 3.8 only). To see the tag:The job logs never show this line: the prepare output is cut at 24,000 characters of stdout (
SSM_INLINE_STDOUT_CHARS), and the complete output is fetched only when the test phase fails. I found it by running the same prepare commands outside CI.(The Modal sandbox runs the same
pip checkand printsNo broken requirements found.with the same package; I could not find out why it passes there.)Change
requirements/requirements-dev.txtdeepspeed-kernels, which is no longer maintained.ci/torch_latest.py:_emit_ssm_outputpreparephase too, not onlytest, so the next prepare failure shows its error in the job log.ci/test_torch_latest.pypip checkitself is unchanged (as #8950 wrote it). The first version of this PR exempted thedeepspeed-kernelsline instead; following review, the package is removed rather than exempted.No active CI job uses
deepspeed-kernels:tests/pytest.ini(not inference_v2_ops); the only workflow that selected them (nv-a6000.yml) is disabled;nv-pre-compile-opsbuilds withDS_BUILD_CUTLASS_OPS=0 DS_BUILD_RAGGED_DEVICE_OPS=0;cmakewas installed, and nothing else inci/,tests/or the workflows usescmake.Not removed:
op_builder/ragged_ops.pyandop_builder/inference_cutlass_builder.pylink prebuilt libraries from the package (-lblockedflash,-ldeepspeedft) to build the inference-v2 ragged kernels and CUTLASS MoE / mixed GEMM. Inference v2 is not deprecated (#8489), and DeepSpeed-MII (0.3.3) still installsdeepspeed-kernelsas a dependency, so those builders keep working for its users.The AWS prepare installs the requirements of the candidate commit, so this change also applies to its own merge-queue run.
Duplicate check
Searched open PRs and issues on 2026-11-05 for "deepspeed-kernels", "pip check", "AWS prepare failed" and "capacity fallback": none addresses this. #8950 added the check; #8921 moved the AWS fallback to Python 3.12.
Tests
Hardware: CPU only (CI controller code and requirements; no GPU path changed). Intel Xeon Platinum 8375C, Ubuntu 22.04.5, CPython 3.12.14, pip 26.3, pytest 8.3.5.
python ci/test_torch_latest.pypython ci/test_tests_fetcher.pypre-commit run --files ci/torch_latest.py ci/test_torch_latest.py requirements/requirements-dev.txtci/requirements-dev.txt(uv 0.12.7, CPython 3.12.14, the three requirements files, torch 2.10.0 cu128 pin, Transformersmain, DeepSpeed master)test_aws_prepare_failure_emits_bounded_s3_tail: a failed prepare whose output exceeds the inline limit prints the tail, including the last line, read from the prepare-phase S3 key.Not run: the real AWS fallback (needs the CI's AWS credentials) and the Modal sandbox. No workflow runs
ci/test_torch_latest.py; I ran it by hand.Compatibility
CI and development requirements only. No DeepSpeed runtime code changes, so no ZeRO stage, offload, precision or parallelism cell is affected. Users who build the inference-v2 ragged or CUTLASS ops from a source checkout now install
deepspeed-kernelsthemselves (DeepSpeed-MII does this).AI assistance
This change, its tests and this description were prepared with AI assistance (Claude), which also ran the tests above.
🤖 Generated with Claude Code