Repository navigation
Bump modal-torch-latest CI Python from 3.10 to 3.12 - #8902
Merged
Merged
Conversation
transformers main now requires Python >=3.11 (SUPPORTED_PYTHON_VERSIONS = 11-14), which conflicts with the Python 3.10 environment used by the modal-torch-latest sandbox. Python 3.12 is within DeepSpeed's supported range (setup.py classifiers list 3.8-3.12) and satisfies the new transformers requirement. Signed-off-by: Guokai Ma <[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. |
pengdurice
approved these changes
Oct 24, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 24, 2026
sfc-gh-truwase
approved these changes
Oct 24, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 24, 2026
tohtana
pushed a commit
that referenced
this pull request
Oct 26, 2026
…test timeouts (#8914) ## Description Since #8902 (Python 3.10 -> 3.12 sandbox bump) landed on 10-25, `modal-torch-latest` merge-queue runs hit repeated `DS_CI_FAILURE_CLASS=timeout: no test progress for 300 seconds` (9 occurrences 10-25..10-26 across pr-8478/8647/8642/8800/8882 and the nightly master run). In every case the watchdog fires while workers are inside `tests/unit/v1/compile/test_compile_zero.py` at 95%+ progress. Root cause: torch 2.10.0's Inductor `SubprocPool.shutdown()` (`torch/_inductor/compile_worker/subproc_pool.py`) waits up to `process.wait(300)` for its nested compile-worker pool when tasks are still in flight at process exit — [pytorch/pytorch#162199](pytorch/pytorch#162199), fixed by [pytorch/pytorch#184038](pytorch/pytorch#184038), first released in torch 2.13. Each `test_compile_zero` case spawns fresh rank processes (`DistributedTest, world_size=2, non_daemonic_procs=True`), so nearly every case pays a fixed ~300s at exit (~310s total per case vs ~20-90s before the sandbox bump). When these cases are the last ones running, the whole-suite 300s no-output watchdog kills pytest. This PR sets `TORCHINDUCTOR_COMPILE_THREADS=1` in the Modal sandbox env: serial compile never creates the worker pool, so the shutdown race cannot occur. The variable should be removed when `MODAL_TORCH_PRESET` moves to >= 2.13. ### Why this does not duplicate an existing PR or issue Checked open PRs for `TORCHINDUCTOR_COMPILE_THREADS`, `inductor timeout`, and `300 seconds timeout` in PR bodies — no existing PR addresses this. ### Test commands run and results (AI-assisted investigation; local reproduction) Local CPU reproduction (no GPU available locally), torch installed from the cpu wheel index: | Env | Experiment | Result | |---|---|---| | py3.12.15 + torch 2.10.0+cpu | `AsyncCompile.process_pool()` + in-flight task, then `shutdown_compile_workers()` | `TimeoutExpired` after exactly **300.0s** (wall 305.8–309.0s) — matches CI's ~310s/case signature | | py3.10.22 + torch 2.10.0+cpu | same | identical 300.0s hang — rules out Python version as the switch | | py3.12.15 + torch 2.10.0+cpu, `TORCHINDUCTOR_COMPILE_THREADS=1` | `process_pool()` unreachable (assert threads>1); cold `torch.compile` shutdown | shutdown **0.00s**; compile 16.7–19.7s vs 17.2–24.5s with default threads (no regression) | | py3.12.15 + torch 2.13.0+cpu | same race as row 1 | shutdown returned in **2.5s** (confirms upstream fix; long-term option) | Hardware: local CPU-only workstation (8 cores). CI-side confirmation is implicit in the modal-torch-latest run for this PR: expected effect is `test_compile_zero` cases dropping from ~310s to ~20s in `--durations` output and no further `timeout: no test progress for 300 seconds`. ### Compatibility matrix CI-infrastructure-only change (sandbox env var for `modal-torch-latest`); no DeepSpeed runtime code, numerics, ZeRO/offload/precision paths, or user-facing behavior are touched. ### AI assistance disclosure The log analysis, root-cause investigation, and local reproduction were AI-assisted (agent session); the change was reviewed and approved for submission by the human author of the signoff. Signed-off-by: Ma, Guokai <[email protected]>
banxingmjj
pushed a commit
to openanolis/DeepSpeed
that referenced
this pull request
Oct 27, 2026
…i#8921) The modal-torch-latest AWS capacity fallback installs the same transformers git main ref as the Modal sandbox, but still provisions Python 3.10.13. transformers main now requires >=3.11.0, so [aws:prepare] fails: `Package 'transformers' requires a different Python: 3.10.13 not in '>=3.11.0'`. deepspeedai#8902 bumped only the Modal sandbox. This aligns the fallback: AWS_PYTHON_VERSION 3.10.13 -> 3.12.14 (CPython the pinned uv 0.12.7 can download, verified), runtime root python310 -> python312, test assertions updated. Validation: pytest ci/test_torch_latest.py 49 passed; yapf/flake8 clean. Signed-off-by: Guokai Ma <[email protected]> Signed-off-by: Guokai Ma <[email protected]> Co-authored-by: pengdurice <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
modal-torch-latestCI installs transformers from themainbranch by default. transformersmainnow declaresSUPPORTED_PYTHON_VERSIONS = (11, 14), i.e.python_requires>=3.11, which conflicts with the Python 3.10 environment provisioned viaadd_python="3.10"in the Modal sandbox (pip fails the install with a requires-python conflict).This bumps
add_pythonfrom"3.10"to"3.12"inci/torch_latest.py. Python 3.12 is within DeepSpeed's officially supported range (setup.py classifiers list 3.8–3.12) and satisfies the new transformers requirement.Example failing run: https://github.com/deepspeedai/DeepSpeed/actions/runs/39958850024/job/120431585981
ci/accelerate.pystill usesadd_python="3.10", left unchanged since it installs transformers from published requirements (currently>=3.10compatible).Validation
pre-commit run --files ci/torch_latest.py— all hooks passpytest ci/test_torch_latest.py— 49 passed