vision: 0.14.0 Regression in wheel metadata
π Describe the bug
The wheel metadata for the 0.14.0 release seems corrupt. It is not installable through installer
, which means that it probably isnβt installable using Hatch or PDM either.
The error is:
AssertionError: In /Users/groodt/Downloads/torchvision-0.14.0-cp39-cp39-manylinux1_x86_64.whl, torchvision-0.14.0.dist-info/RECORD is not mentioned in RECORD
Full reproduction and traceback here:
python3 -m pip install installer
python3 -m installer --destdir . ~/Downloads/torchvision-0.14.0-cp39-cp39-manylinux1_x86_64.whl
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/private/tmp/blah/.venv/lib/python3.10/site-packages/installer/__main__.py", line 85, in <module>
_main(sys.argv[1:], "python -m installer")
File "/private/tmp/blah/.venv/lib/python3.10/site-packages/installer/__main__.py", line 81, in _main
installer.install(source, destination, {})
File "/private/tmp/blah/.venv/lib/python3.10/site-packages/installer/_core.py", line 96, in install
for record_elements, stream, is_executable in source.get_contents():
File "/private/tmp/blah/.venv/lib/python3.10/site-packages/installer/sources.py", line 158, in get_contents
assert record is not None, "In {}, {} is not mentioned in RECORD".format(
AssertionError: In /Users/groodt/Downloads/torchvision-0.14.0-cp39-cp39-manylinux1_x86_64.whl, torchvision-0.14.0.dist-info/RECORD is not mentioned in RECORD
Versions
0.14.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 17 (4 by maintainers)
I believe I identified the issue and have submitted a PR with a proposed fix here: https://github.com/pytorch/builder/pull/1215
The issue is that the
RECORD
file is deleted before callingmake_wheel_record
. Themake_wheel_record
function expects to write aRECORD
file. By changing the deletion to a truncate, the logic works correctly.Yes, 1.13.1, which among another things will contain the change will likely be available tomorrow
This affects only binaries uploaded to official pypi index, which makes me suspect that it might be due to bug in https://github.com/pytorch/builder/blob/85fc34387957e3810602fdeea97c1a9687af04b3/release/pypi/prep_binary_for_pypi.sh#L93
Bazel also fails with the same error when using
pip_parse
rule fromrules_python
.