Skip to content

Remove conda usage in windows binary builds - #151035

Closed
atalman wants to merge 36 commits into
pytorch:mainfrom
atalman:windows_conda_removal
Closed

atalman wants to merge 36 commits into
pytorch:mainfrom
atalman:windows_conda_removal

Conversation

@atalman

@atalman atalman commented Apr 10, 2025 •

Copy link
Copy Markdown
Collaborator

This is related to : #146048
Removing conda from windows binary builds. At this point we are only removing conda and replacing it with python builds. Not rewriting all batch files as python or bash.

Additionally cleanup unused files:

.ci/pytorch/windows/internal/static_lib_test.bat
.ci/pytorch/windows/internal/env_fix.bat
.ci/pytorch/windows/internal/vs_install.bat

@atalman atalman added the ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR label Apr 10, 2025
@atalman
atalman requested a review from a team as a code owner April 10, 2025 19:22
@pytorch-bot

pytorch-bot Bot commented Apr 10, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151035

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure, 7 Cancelled Jobs

As of commit 4bdaf18 with merge base f65fb0a (image):

NEW FAILURE - The following job has failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@atalman atalman added the topic: not user facing topic category label Apr 28, 2025
Comment thread .ci/pytorch/windows/condaenv.bat Resolved

@ZainRizvi ZainRizvi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And as a naming nit, this PR seems to be reducing conda usage, not removing it.

Would be create to improve the PR title and description to say exactly what the PR is intended to do (in this case, the specific conda dependencies being removed, since we're not removing conda completely)

@atalman
atalman marked this pull request as draft April 28, 2025 23:15
@atalman

atalman commented Apr 28, 2025 •

Copy link
Copy Markdown
Collaborator Author

@ZainRizvi Plan for this PR is to iterate replacing instllation of packages from pypi. When ready remove the conda env. I believe after few iterations conda usage is completely removed

@atalman atalman changed the title Remove conda usage in condaenv.bat Remove conda usage in windows binary builds May 2, 2025
@atalman
atalman marked this pull request as ready for review May 2, 2025 15:14
@clee2000 clee2000 added the ciflow/trunk Trigger trunk jobs on your pull request label May 2, 2025
@atalman
atalman force-pushed the windows_conda_removal branch from 6a16a0f to 590577a Compare May 2, 2025 17:17
@atalman

atalman commented May 5, 2025

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and windows workflows are green"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

zklaus added a commit to zklaus/pytorch that referenced this pull request Jun 16, 2026
set_desired_python.sh pinned the patch level to ".0", which freezes each
minor on its oldest release and ships known CVEs for the life of the
minor. That pin was introduced by pytorchgh-151035 when it swapped conda (whose
`python=3.X` floated to the newest channel patch) for the python.org
installer.

Replace it with an explicit per-minor patch table. This keeps installs
reproducible (a given commit always resolves the same interpreter) while
letting us move off the oldest patch deliberately in review. Floating to
the newest installer was considered and rejected: python.org serves
source-only releases for security-only minors (e.g. 3.10.20 has no
amd64.exe), so floating requires scraping the release index and
HEAD-probing candidates newest-first, which makes every build depend on
that listing and fires request bursts that python.org rate-limits.

The security-only minors (3.10-3.12) are pinned to their last release
that shipped a Windows installer; the bugfix minors (3.13, 3.14) point at
the current newest installer and carry a comment to bump them here. The
table must stay in sync with the matrix in
generated-windows-binary-wheel-nightly.yml.

Test Plan:

```
bash -n .ci/pytorch/windows/set_desired_python.sh
lintrunner -a .ci/pytorch/windows/set_desired_python.sh
```

Verified each pinned installer exists (HTTP 200) and that the source-only
successors 404, confirming the security-only pins are the last available:

```
3.10.11 200 / 3.10.12+ source-only
3.11.9  200 / 3.11.10 404
3.12.10 200 / 3.12.11 404
3.13.14 200 (current bugfix latest)
3.14.6  200 (current bugfix latest)
```

Authored with assistance from Claude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants