Title: fix: Stop add_cpu_torch_hashes failing on a universal torch split by haoxu0 · Pull Request #6959 · feast-dev/feast · GitHub
Open Graph Title: fix: Stop add_cpu_torch_hashes failing on a universal torch split by haoxu0 · Pull Request #6959 · feast-dev/feast
X Title: fix: Stop add_cpu_torch_hashes failing on a universal torch split by haoxu0 · Pull Request #6959 · feast-dev/feast
Description: What is broken make lock-python-dependencies-all cannot complete on master. It aborts after compiling the first file: ValueError: Missing CPU hashes for torch==2.14.1+cpu make: *** [lock-python-dependencies-all] Error 1 Because the target begins with rm -rf sdk/python/requirements/*, a run leaves the tree with 14 of the 15 requirements files deleted and nothing regenerated. Why uv pip compile --universal --torch-backend cpu splits torch by marker, so the lock holds two pins per package. This is the shape in all three committed py3.*-ci-requirements.txt today: torch==2.14.0 ; sys_platform == 'darwin' torch==2.14.0+cpu ; sys_platform != 'darwin' torchvision==0.29.0 ; sys_platform == 'darwin' torchvision==0.29.0+cpu ; sys_platform != 'darwin' add_hashes looked every entry up by appending +cpu to its version: hashes = cpu_hashes.get((name, f"{version}+cpu")) For the second pin of each pair that asks for 2.14.0+cpu+cpu, which no resolve can produce, so the lookup missed and the script raised. Why the tests did not catch it test_cpu_hashes_preserve_pypi_hashes_and_pins feeds in a bare torch==2.13.0 and nothing else, so the +cpu pin that a real --universal resolve emits is never exercised. The script and its tests landed together in #6188, and the requirements files were last regenerated before that, so the target appears not to have been run since. The change The +cpu pin is already the CPU wheel, so it needs no hashes added and is now returned untouched. Returning it, rather than normalising the lookup key to version.removesuffix("+cpu") + "+cpu", is deliberate: both stop the crash, but normalising would union the CPU resolve's hashes into that entry and could widen the set of artifacts the pin accepts. Returning it leaves the hash set exactly as the resolver wrote it, so no lock can start accepting an artifact it did not accept before. A genuine version mismatch still raises, which the existing third test covers unchanged. Verification Two tests added, for a single marker split and for the torch + torchvision pair the lock actually contains, both asserting idempotency. sdk/python/tests/unit/infra/scripts/test_cpu_torch_hashes.py: 4 passed. Checked against real data — add_cpu_hashes run over each committed file with the CPU pins a --torch-backend cpu --no-deps resolve would return: file before after py3.10-ci-requirements.txt raised OK, idempotent py3.11-ci-requirements.txt raised OK, idempotent py3.12-ci-requirements.txt raised OK, idempotent ruff check and ruff format --check clean. I found this trying to satisfy a review on #6958, which asks for regenerated locks and cannot be done until this is fixed.
Open Graph Description: What is broken make lock-python-dependencies-all cannot complete on master. It aborts after compiling the first file: ValueError: Missing CPU hashes for torch==2.14.1+cpu make: *** [lock-python-dep...
X Description: What is broken make lock-python-dependencies-all cannot complete on master. It aborts after compiling the first file: ValueError: Missing CPU hashes for torch==2.14.1+cpu make: *** [lock-python-dep...
Opengraph URL: https://github.com/feast-dev/feast/pull/6959
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b6be783e-0f0a-981e-fc49-42f6fa45f9bc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D84:3C28FE:226CB9:2DF6B4:6AFE9895 |
| html-safe-nonce | b65f1cbce0c0b661c992bb4d3145997daf0afc196470519060ee4eca73e8fdf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDg0OjNDMjhGRToyMjZDQjk6MkRGNkI0OjZBRkU5ODk1IiwidmlzaXRvcl9pZCI6Ijc1MDYzOTkxODc3OTgyMzUyODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5274d7f9bfb709d713224c312c2db7646ce08af67e46a7aae67da4896c15cbc3 |
| hovercard-subject-tag | pull_request:4769179421 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6959/files |
| twitter:image | https://avatars.githubusercontent.com/u/20422210?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/20422210?s=400&v=4 |
| og:image:alt | What is broken make lock-python-dependencies-all cannot complete on master. It aborts after compiling the first file: ValueError: Missing CPU hashes for torch==2.14.1+cpu make: *** [lock-python-dep... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width