Skip to content

Bump modal-torch-latest CI Python from 3.10 to 3.12 - #8902

Merged
tohtana merged 1 commit into
masterfrom
ci/modal-python-3.12
Oct 24, 2026
Merged

tohtana merged 1 commit into
masterfrom
ci/modal-python-3.12

Conversation

@delock

@delock delock commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Description

The modal-torch-latest CI installs transformers from the main branch by default. transformers main now declares SUPPORTED_PYTHON_VERSIONS = (11, 14), i.e. python_requires>=3.11, which conflicts with the Python 3.10 environment provisioned via add_python="3.10" in the Modal sandbox (pip fails the install with a requires-python conflict).

This bumps add_python from "3.10" to "3.12" in ci/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.py still uses add_python="3.10", left unchanged since it installs transformers from published requirements (currently >=3.10 compatible).

Validation

  • pre-commit run --files ci/torch_latest.py — all hooks pass
  • pytest ci/test_torch_latest.py — 49 passed

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T12:36:27.701556Z
We couldn’t complete this review. Comment @codex review to try again.
2ceb5b2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pengdurice
pengdurice added this pull request to the merge queue Oct 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 24, 2026
@sfc-gh-truwase
sfc-gh-truwase added this pull request to the merge queue Oct 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 24, 2026
@tohtana
tohtana merged commit fc7bc30 into master Oct 24, 2026
15 checks passed
@tohtana
tohtana deleted the ci/modal-python-3.12 branch October 24, 2026 21:20
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]>
@auto-pr-labeler-with-jev auto-pr-labeler-with-jev Bot added the skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU. label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants