Skip to content

Conversation

@zklaus
Copy link
Collaborator

@zklaus zklaus commented Jul 8, 2025

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jul 8, 2025

🔗 Helpful Links

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

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

❌ 2 Cancelled Jobs

As of commit 6461738 with merge base 3a7db34 (image):

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

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

zklaus added 3 commits July 29, 2025 14:15
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@XuehaiPan
Copy link
Collaborator

Will need to add a test for the SDist:

$ uv pip install -v torch-*.tar.gz
DEBUG uv 0.8.3 (Homebrew 2025-07-24)
DEBUG Searching for default Python interpreter in virtual environments
DEBUG Found `cpython-3.13.5-macos-aarch64-none` at `/Users/PanXuehai/Projects/pytorch/dist/venv/bin/python3` (active virtual environment)
Using Python 3.13.5 environment at: venv
DEBUG Acquired lock for `venv`
DEBUG At least one requirement is not satisfied: file:///Users/PanXuehai/Projects/pytorch/dist/torch-2.9.0a0+gite955d76.tar.gz
...
DEBUG adding 'torchgen/selective_build/selector.py'
DEBUG adding 'torchgen/static_runtime/__init__.py'
DEBUG adding 'torchgen/static_runtime/config.py'
DEBUG adding 'torchgen/static_runtime/gen_static_runtime_ops.py'
DEBUG adding 'torchgen/static_runtime/generator.py'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/METADATA'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/WHEEL'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/entry_points.txt'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/top_level.txt'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/RECORD'
DEBUG removing build/bdist.macosx-15.0-arm64/wheel
DEBUG Released lock at `/var/folders/9r/g38s_wqs3kg0cy0n0mcdq92h0000gn/T/uv-setuptools-b139a3b1e08b9b31.lock`
DEBUG Released lock at `/Users/PanXuehai/.cache/uv/sdists-v9/path/da64d06ad13a9430/.lock`
  × Failed to build `torch @ file:///Users/PanXuehai/Projects/pytorch/dist/torch-2.9.0a0+gite955d76.tar.gz`
  ╰─▶ Package metadata version `2.9.0a0+gitunknown` does not match given version `2.9.0a0+gite955d76`
DEBUG Released lock at `/Users/PanXuehai/Projects/pytorch/dist/venv/.lock`

zklaus added 2 commits August 8, 2025 16:03
[ghstack-poisoned]
[ghstack-poisoned]
@zklaus
Copy link
Collaborator Author

zklaus commented Aug 11, 2025

Will need to add a test for the SDist:

$ uv pip install -v torch-*.tar.gz
DEBUG uv 0.8.3 (Homebrew 2025-07-24)
DEBUG Searching for default Python interpreter in virtual environments
DEBUG Found `cpython-3.13.5-macos-aarch64-none` at `/Users/PanXuehai/Projects/pytorch/dist/venv/bin/python3` (active virtual environment)
Using Python 3.13.5 environment at: venv
DEBUG Acquired lock for `venv`
DEBUG At least one requirement is not satisfied: file:///Users/PanXuehai/Projects/pytorch/dist/torch-2.9.0a0+gite955d76.tar.gz
...
DEBUG adding 'torchgen/selective_build/selector.py'
DEBUG adding 'torchgen/static_runtime/__init__.py'
DEBUG adding 'torchgen/static_runtime/config.py'
DEBUG adding 'torchgen/static_runtime/gen_static_runtime_ops.py'
DEBUG adding 'torchgen/static_runtime/generator.py'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/METADATA'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/WHEEL'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/entry_points.txt'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/top_level.txt'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/RECORD'
DEBUG removing build/bdist.macosx-15.0-arm64/wheel
DEBUG Released lock at `/var/folders/9r/g38s_wqs3kg0cy0n0mcdq92h0000gn/T/uv-setuptools-b139a3b1e08b9b31.lock`
DEBUG Released lock at `/Users/PanXuehai/.cache/uv/sdists-v9/path/da64d06ad13a9430/.lock`
  × Failed to build `torch @ file:///Users/PanXuehai/Projects/pytorch/dist/torch-2.9.0a0+gite955d76.tar.gz`
  ╰─▶ Package metadata version `2.9.0a0+gitunknown` does not match given version `2.9.0a0+gite955d76`
DEBUG Released lock at `/Users/PanXuehai/Projects/pytorch/dist/venv/.lock`

Good catch about the version number. This happens because the version is (should be) fixed at the time of building the sdist, but is recalculated by setup.py when building the wheel from the sdist, now with the git information missing. The solution is to take the version information from the sdist at wheel-build time, which I implemented in #160315.

@zklaus zklaus requested a review from XuehaiPan August 11, 2025 11:59
@zklaus zklaus added the topic: not user facing topic category label Aug 11, 2025
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@XuehaiPan XuehaiPan added module: build Build system issues ciflow/binaries Trigger all binary build and upload jobs on the PR topic: build labels Sep 19, 2025
[ghstack-poisoned]
[ghstack-poisoned]
@zklaus zklaus requested a review from XuehaiPan September 19, 2025 12:27
@zklaus
Copy link
Collaborator Author

zklaus commented Sep 19, 2025

Thanks, @XuehaiPan! I have addressed your comments and also updated the manifest with some small changes that happened more recently.

@zklaus
Copy link
Collaborator Author

zklaus commented Sep 19, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 19, 2025
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Approvers from one of the following sets are needed:

  • superuser (pytorch/metamates)
  • Core Reviewers (mruberry, lezcano, Skylion007, ngimel, peterbell10, ...)
  • Core Maintainers (soumith, gchanan, ezyang, dzhulgakov, malfet, ...)
Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

[ghstack-poisoned]
Copy link
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

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

lgtm

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #157815

1 similar comment
@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #157815

pytorchmergebot pushed a commit that referenced this pull request Sep 25, 2025
The version finding logic triggered from `setup.py` generally tries to take the git information into account.
This is fine for most situations where we are building from a checkout, but it creates a problem in the case of sdists, as here the version is determined at the time of sdist creation, taking the git information into account, but then later recalculated when building wheels or installing from the sdist, now with the git information missing.

The solution is to take the version information directly from the sdist, which this PR adds by means of parsing the `PKG-INFO` which marks an unpacked sdist.

Pull Request resolved: #160315
Approved by: https://github.com/atalman
ghstack dependencies: #157814
pytorchmergebot pushed a commit that referenced this pull request Sep 25, 2025
jainapurva pushed a commit that referenced this pull request Sep 29, 2025
The version finding logic triggered from `setup.py` generally tries to take the git information into account.
This is fine for most situations where we are building from a checkout, but it creates a problem in the case of sdists, as here the version is determined at the time of sdist creation, taking the git information into account, but then later recalculated when building wheels or installing from the sdist, now with the git information missing.

The solution is to take the version information directly from the sdist, which this PR adds by means of parsing the `PKG-INFO` which marks an unpacked sdist.

Pull Request resolved: #160315
Approved by: https://github.com/atalman
ghstack dependencies: #157814
jainapurva pushed a commit that referenced this pull request Sep 29, 2025
@github-actions github-actions bot deleted the gh/zklaus/17/head branch October 26, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries Trigger all binary build and upload jobs on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged module: binaries Anything related to official binaries that we release to users module: build Build system issues open source topic: build topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants