torchcodec: cover torch 2.11 in the compatibility guard and pin per torch minor
install.sh's CUDA branch allows torch>=2.4,<2.12.0 and the cu12x/cu13x wheel indexes top out at torch 2.11.0, so a fresh NVIDIA install lands on torch 2.11. studio/backend/requirements/extras-no-deps.txt pinned torchcodec==0.10.0, which upstream pairs with torch 2.10 exactly, and torchcodec publishes no Requires-Dist: torch, so pip cannot notice. The guard that exists to catch this, _torchcodec_version_mismatch_hint, looks the torch minor up in _TORCH_TORCHCODEC_MINORS and returns None on a miss, and the table had no "2.11" row: it was silent on precisely the version where the mismatch now happens. Add the 2.11 row (mirrored into scripts/notebook_validator.py), add an audio-torch211 extra pinning the 0.11 line, and select torchcodec at install time from the venv's torch minor instead of a flat pin. A requirements file cannot branch on the installed torch version, so _select_torchcodec_spec follows the existing _select_torchao_spec pattern. It runs after the final torch repair, which can still move torch onto another minor. torchcodec 0.11 is the release upstream pairs with torch 2.11 exactly and the newest one published on the cu128 index install.sh resolves torch 2.11.0 from, since 0.12 dropped CUDA 12.8. From 0.12 torchcodec is ABI stable against torch >= 2.11, so that half of the matrix is open ended and cannot be written as a finite set of minors; both checkers now exempt torchcodec >= 0.12 on torch >= 2.11 rather than flagging a combination upstream supports, and torch 2.12+ installs take the open >=0.12.0 floor instead of the 2.11-only 0.11 line. Also bump the installer step total for the new step and keep torchcodec inside the security audit set now that it no longer comes from a requirements file.
This commit is contained in:
parent
0c1c9f71db
commit
ef240d5a61
7 changed files with 352 additions and 13 deletions
16
.github/workflows/security-audit.yml
vendored
16
.github/workflows/security-audit.yml
vendored
|
|
@ -229,9 +229,13 @@ jobs:
|
|||
d = tomllib.load(f)
|
||||
core = d["project"]["dependencies"]
|
||||
extras = d["project"]["optional-dependencies"]["huggingfacenotorch"]
|
||||
# torchcodec is no longer pinned in extras-no-deps.txt (the installer
|
||||
# picks the line matching the venv's torch minor), so pull the newest
|
||||
# audio extra in to keep torchcodec inside the audited set.
|
||||
audio = d["project"]["optional-dependencies"]["audio-torch211"]
|
||||
print("# Auto-generated from pyproject.toml by security-audit.yml.")
|
||||
print("# core deps + huggingfacenotorch extras.")
|
||||
for spec in core + extras:
|
||||
print("# core deps + huggingfacenotorch extras + audio-torch211.")
|
||||
for spec in core + extras + audio:
|
||||
print(spec)
|
||||
PY
|
||||
for f in studio.txt extras.txt extras-no-deps.txt \
|
||||
|
|
@ -822,9 +826,13 @@ jobs:
|
|||
d = tomllib.load(f)
|
||||
core = d["project"]["dependencies"]
|
||||
extras = d["project"]["optional-dependencies"]["huggingfacenotorch"]
|
||||
# torchcodec is no longer pinned in extras-no-deps.txt (the installer
|
||||
# picks the line matching the venv's torch minor), so pull the newest
|
||||
# audio extra in to keep torchcodec inside the audited set.
|
||||
audio = d["project"]["optional-dependencies"]["audio-torch211"]
|
||||
print("# Auto-generated from pyproject.toml by security-audit.yml.")
|
||||
print("# core deps + huggingfacenotorch extras.")
|
||||
for spec in core + extras:
|
||||
print("# core deps + huggingfacenotorch extras + audio-torch211.")
|
||||
for spec in core + extras + audio:
|
||||
print(spec)
|
||||
PY
|
||||
for f in studio.txt extras.txt extras-no-deps.txt \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue