Repo checker: PyTorch's index also serves numpy, pillow and triton, but the page answers them from PyPI and offers no fix for any row
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 32/100
Hướng nghiên cứu
Start in site/check/driver.py: the PUBLIC_EXTRA_INDEXES entry for download.pytorch.org, _lookups() and check(), where extra_pkg_hosts and origin.known_pypi() decide lookup. Then read renderVerdict() in site/check/check.mjs. Done when tests/test_check_driver.py shows numpy and pillow unknown with the reason, scipy checked with lookup: true, fixes() answering the pyyaml gap, and the #219 private-index tests still passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Since #233 a requirements file whose only other index is PyTorch's (--extra-index-url https://download.pytorch.org/whl/...) is looked up on PyPI, and torch, torchvision and torchaudio are shown as unknown. PyTorch's index serves many more packages than those three. Its cu128 page lists 113 projects, among them numpy, pillow, markupsafe, jinja2, requests, triton, networkx, sympy and dozens of nvidia-* packages. The cpu page has numpy, pillow, markupsafe, jinja2, triton and requests too. The page answers all of those from PyPI as if that were certain.
It matters, because the installers don't take them from PyPI alone. pip looks at both indexes and picks the best file it finds on either of them. uv's default index strategy takes each package from the first index that has it, and an --extra-index-url comes before the default index (uv docs). So uv pip install -r requirements.txt takes numpy only from download.pytorch.org, whatever PyPI has.
A real case: keras-team/keras's requirements.txt has --extra-index-url https://download.pytorch.org/whl/cpu and -r requirements-common.txt, which lists numpy, scipy, pillow, pandas and more. deepfakes/faceswap's requirements/requirements_cpu.txt has the same line and includes numpy>=2.4.0,<2.5.0 and pillow>=12.2.0.
A second problem: every row of such a file gets lookup: false, so the page offers no fix for any of them, including packages the PyTorch index doesn't have. Run with wheelgap 0.13.0, as the worker does: a file with the PyTorch line, numpy==1.26.4 and pyyaml==6.0.3, checked for 3.15 on linux-x86_64, gives source for both, each with "lookup": false. pyyaml 6.0.4 has the wheel, but the page never says so. The cause is origin.known_pypi(), which needs source.pypi_only, and that is false for any file with an index line.
Where
PUBLIC_EXTRA_INDEXESinsite/check/driver.py:"download.pytorch.org": frozenset({"torch", "torchvision", "torchaudio"})._lookups()andcheck()in the same file:extra_pkg_hostsmarks a row unknown with itsreason.on_pypiandlookupare set fromorigin.known_pypi().renderVerdict()insite/check/check.mjsalready lists the rows that carry the reason in its "also installs from" alert.
What to do
- Replace the three names with the names the index serves: the union of the project lists on its pages (
/whl/cpu/,/whl/cu1xx/,/whl/rocm.../,/whl/xpu/), as canonical names. Keep the list indriver.py(or a JSON file beside it) with a comment saying the date it was read and how to read it again. A small script inscripts/that prints the list is welcome, but nothing at run time fetches it. - Every row whose name is on that list is unknown, with today's reason (
may be installed from download.pytorch.org, which this page doesn't read). - A row whose name isn't on the list is answered from PyPI, as now, and gets
lookup: truewhen it was found on PyPI. Its name was already sent to pypi.org for the check, so the fix lookup sends nothing new. - Keep every rule from #219 that keeps a file private: other hosts,
--index-url,--find-links, settings files, quotes and$in option lines.
Done when:
-
tests/test_check_driver.py: a keras-shaped file (thecpuline,-rof a file withnumpy,scipyandpillow): numpy and pillow are unknown with the reason, and scipy is checked withlookup: true. -
tests/test_check_driver.py:fixes()answers for a gap in a package the index doesn't serve (the pyyaml example above), and gives nothing for one it does. - A test that the list is canonical, sorted and holds
torch,numpyandpillow. -
test_a_private_index_package_is_never_looked_up_on_pypiand the #219 tests pass unchanged. - In the PR:
keras-team/kerasbefore and after, as screenshots.
- Ngôn ngữ chính
- JavaScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 38 phút
- Pull request đã merge (30 ngày)
- 132
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của wheelgap/tracker
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 42/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted high impact
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
wheelgap/tracker#208 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wheelgap/tracker
Issue tương tự
-
content
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
StudentSuite/awesome-study-resources#545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
刪除對於電話號碼與停車編號的限定Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Fei2411/DeepSeek-Bot#2148 ·
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
linuxmint/cinnamon-spices-desklets#1964 ·
Maintainer thường phản hồi trong vòng 1 ngày