Skip to content

[windows-ami] Move the base conda env to Python 3.11 - #9178

Merged
huydhn merged 4 commits into
mainfrom
windows-ami-py311
Oct 23, 2026
Merged

huydhn merged 4 commits into
mainfrom
windows-ami-py311

Conversation

@huydhn

@huydhn huydhn commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
torchci Ignored Ignored Oct 22, 2026 10:48pm UTC

Request Review

@huydhn
huydhn requested a review from atalman October 22, 2026 21:31
Since ~2026-10-21 every conda-libmamba-solver and libmamba build on Anaconda's
defaults channel constrains certifi>=2026.10.19 and ca-certificates>=2026.10.20.
That certifi is noarch python>=3.10 only, so any solve in the Windows AMI's
Python 3.9 base env is now unsatisfiable. This breaks `conda install conda=25.3.0`
in setup-binary-builds (Windows wheel builds for vision, audio, torchcodec,
executorch, rl) and `conda install conda=23.11.0` in validate_binaries.sh
(nightly Windows binary validation).

- Install Miniconda3-py311_25.3.1-1. 3.11 rather than 3.12 because conda 23.11.0
  has no py312 build; conda 25.3.1 sits next to the 25.3.0 pin in
  setup-binary-builds and predates conda 26 dropping the implicit defaults channel.
- Drop the stale base env pins (conda==22.9.0, scipy=1.6.2, numpy<1.23,
  dataclasses) that have no py311 builds and constrain every later base solve.
- Remove Install-Pip-Dependencies.ps1: 2022-era PyTorch test pins pip-installed
  into conda's own env, several without py311 wheels. PyTorch CI installs its
  test deps into its own py_tmp env.
- windows_job.yml: only install pywin32==300 on the py39 AMI; it has no wheel
  for newer Python.
@huydhn
huydhn force-pushed the windows-ami-py311 branch from d2787a5 to 5135f18 Compare October 22, 2026 22:48
@huydhn
huydhn merged commit 5eb519a into main Oct 23, 2026
12 of 14 checks passed
@huydhn
huydhn deleted the windows-ami-py311 branch October 23, 2026 19:30
huydhn added a commit that referenced this pull request Oct 24, 2026
…61023202818 (#9192)

- Point the `wincanarylf` canary at the new Windows AMI `Windows 2019
GHA CI - 20261023202818` (`ami-0c96a407e415afce4`), built from #9178
(base conda env on Python 3.11). This lets us test it on canary before
rolling it out to prod.
@guilhermeleobas

Copy link
Copy Markdown

@huydhn given this one was merged, can I bump the python version on _win-build.yml / _win-test.yml to 3.11?

@huydhn

huydhn commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@huydhn given this one was merged, can I bump the python version on _win-build.yml / _win-test.yml to 3.11?

Oh, you can do it soon once pytorch/ci-infra#1147 merges. This PR prepares the AMI, and pytorch/ci-infra#1147 rolls it out to CI. I'm waiting for the test to finish there before merging.

@guilhermeleobas

Copy link
Copy Markdown

Awersome! Thank you

@huydhn

huydhn commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

I just notice pytorch/pytorch#202069 from @malfet, which is doing the same thing you have in mind I think

@malfet

malfet commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

I think this one is for domain libraries

atalman added a commit that referenced this pull request Oct 27, 2026
Release-branch-only change for `release/2.15`. This is the
`windows_job.yml` hunk of #9178, which only landed on `main`.

## What
Remove the three lines in `.github/workflows/windows_job.yml` that run
`python.exe -m pip install --upgrade pywin32==300` before every Windows
job script. After this, `windows_job.yml` on `release/2.15` matches
`main` except for the `test-infra-ref` default.

## Why
Every Windows job in `Validate binaries` on `release/2.15` now fails at
that line, for example [run
40520704319](https://github.com/pytorch/test-infra/actions/runs/40520704319)
(15 Windows jobs across cpu, xpu and cuda, wheels and libtorch):

```
ERROR: Could not find a version that satisfies the requirement pywin32==300 (from versions: 303, 304, 305, 306, 307, 308, 309, 310, 311, 312)
ERROR: No matching distribution found for pywin32==300
```

#9178 moved the Windows AMI's base conda env from Python 3.9 to 3.11
(Anaconda now needs `certifi >=2026.10.19`, which requires Python
3.10+). The base `python.exe` that this line uses is now a 3.11
interpreter, and pip there does not offer `pywin32==300`. The pin was a
workaround for conda/conda#11503 on the old conda; `main` dropped it in
#9178, but `release/2.15` was cut before that and still has it, so
release validation is broken even though the runners are healthy.

## Testing
Not run end to end. Compared against `main`: the diff of
`windows_job.yml` between this branch and `main` is the `test-infra-ref`
default only. After merge, re-dispatch `Validate binaries` on
`release/2.15`.

Co-authored-by: Andrey Talman <[email protected]>
kuring pushed a commit to kuring/ci-infra that referenced this pull request Nov 2, 2026
- Move LF Windows runners to `Windows 2019 GHA CI - 20261023202818`
(`ami-0c96a407e415afce4`), whose base conda env is on Python 3.11
(pytorch/test-infra#9178). The current AMI's Python 3.9 base can no
longer solve `conda install`, which breaks Windows wheel builds and
binary validation.
- AMI built from test-infra `main` at `0c73feb5ef`, which includes
#9178: [build
run](https://github.com/pytorch/test-infra/actions/runs/40019217600/job/120639842520).
It is the newest `Windows 2019 GHA CI - *` AMI owned by `391835788720`.
- Testing: canary deploy
https://github.com/pytorch/ci-infra/actions/runs/40049378360, test PR
pytorch/pytorch#201924
- Windows binary wheel on canary:
https://github.com/pytorch/pytorch/actions/runs/40381447769 (previous
run, all Windows jobs passed:
https://github.com/pytorch/pytorch/actions/runs/40050169941)
- trunk Windows jobs on canary:
https://github.com/pytorch/pytorch/actions/runs/40381446561
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.

4 participants