pip: gate the torchcodec extras to platforms with a wheel
torchcodec publishes no sdist and only manylinux_2_28_x86_64, macosx_*_arm64 and win_amd64 wheels, so on Linux aarch64, Windows ARM64 and Intel Mac there is nothing for pip to resolve and the whole install fails before the user gets an environment. Wiring audio-torch210 into the cu*-torch2100 extras made that reachable from those extras too. Gate on the platforms that have a wheel, matching PLATFORM_LACKS_TORCHCODEC_WHEEL in studio/install_python_stack.py. Also record why the amd and huggingfacenotorch extras cannot be torch-free on this branch: extras are additive to the base dependencies, which deliberately carry the full runtime here so a bare pip install works.
This commit is contained in:
parent
b6ecab8654
commit
148de9f970
1 changed files with 20 additions and 4 deletions
|
|
@ -157,6 +157,13 @@ huggingface = [
|
|||
"pyyaml",
|
||||
"nest-asyncio",
|
||||
]
|
||||
# "notorch" means this list declares no torch of its own, not that installing it
|
||||
# leaves you torch-free: extras are additive to [project].dependencies, which on
|
||||
# this branch deliberately carry the full runtime so a bare `pip install unsloth`
|
||||
# works, and accelerate/peft/sentence-transformers each require torch anyway. The
|
||||
# genuinely torch-free path is the installer's --no-deps pass over
|
||||
# studio/backend/requirements/no-torch-runtime.txt, not plain pip resolution.
|
||||
# Kept byte-identical to main so the two branches can be diffed for drift.
|
||||
huggingfacenotorch = [
|
||||
"unsloth_zoo>=2026.7.6",
|
||||
"wheel>=0.42.0",
|
||||
|
|
@ -177,6 +184,11 @@ huggingfacenotorch = [
|
|||
"trl>=0.18.2,!=0.19.0,<=0.24.0",
|
||||
"sentence-transformers",
|
||||
]
|
||||
# What this extra does on this branch is raise the bitsandbytes floor; it does not
|
||||
# hand you a ROCm stack. The base dependencies still apply, so ROCm torch has to
|
||||
# come from the AMD index or already be installed (pip leaves an installed
|
||||
# +rocm torch alone, since it satisfies the base specifier). Use install.sh or
|
||||
# `unsloth studio install` for a torch-free AMD install.
|
||||
amd = [
|
||||
"unsloth[huggingfacenotorch]",
|
||||
# 4-bit decode is unreliable on ROCm before 0.50.0, the first PyPI release
|
||||
|
|
@ -545,15 +557,19 @@ flashattention = [
|
|||
"flash-attn>=2.6.3 ; ('linux' in sys_platform)",
|
||||
]
|
||||
# torchcodec is the audio decode path; its releases track torch minor versions,
|
||||
# so each torch minor gets its own window (#7225).
|
||||
# so each torch minor gets its own window (#7225). It publishes no sdist and only
|
||||
# manylinux_2_28_x86_64, macosx_*_arm64 and win_amd64 wheels, so Linux aarch64,
|
||||
# Windows ARM64 and Intel Mac have nothing to resolve and pip would hard-fail the
|
||||
# whole install. Gate on the platforms that have a wheel, matching
|
||||
# PLATFORM_LACKS_TORCHCODEC_WHEEL in studio/install_python_stack.py.
|
||||
audio-torch280 = [
|
||||
"torchcodec>=0.6.0,<0.8.0 ; python_version >= '3.9'",
|
||||
"torchcodec>=0.6.0,<0.8.0 ; python_version >= '3.9' and (((sys_platform == 'linux' or sys_platform == 'win32') and (platform_machine == 'x86_64' or platform_machine == 'AMD64')) or (sys_platform == 'darwin' and platform_machine == 'arm64'))",
|
||||
]
|
||||
audio-torch290 = [
|
||||
"torchcodec>=0.8.0,<0.10.0 ; python_version >= '3.10'",
|
||||
"torchcodec>=0.8.0,<0.10.0 ; python_version >= '3.10' and (((sys_platform == 'linux' or sys_platform == 'win32') and (platform_machine == 'x86_64' or platform_machine == 'AMD64')) or (sys_platform == 'darwin' and platform_machine == 'arm64'))",
|
||||
]
|
||||
audio-torch210 = [
|
||||
"torchcodec>=0.10.0,<0.11.0 ; python_version >= '3.10'",
|
||||
"torchcodec>=0.10.0,<0.11.0 ; python_version >= '3.10' and (((sys_platform == 'linux' or sys_platform == 'win32') and (platform_machine == 'x86_64' or platform_machine == 'AMD64')) or (sys_platform == 'darwin' and platform_machine == 'arm64'))",
|
||||
]
|
||||
colab-ampere-torch211 = [
|
||||
"unsloth[huggingface]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue