-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
questionAsking for clarification or supportAsking for clarification or support
Description
Hello,
I've encountered an issue while trying to specify different versions of PyTorch for Intel macOS in my project.
Here is a minimal pyproject.toml that shows the issue:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "test"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"torch>=1.13.1,<2.3; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"torch>=1.13.1; sys_platform != 'darwin' or platform_machine == 'arm64'",
]I’m trying to make sure that Intel macOS (darwin_x86_64) uses a specific version of PyTorch as there are no new wheels available for versions 2.3 and above. But the dependency resolver seems to apply this constraint universally when generating the lock file, resulting in version 2.2.2 being installed across all platforms.
Is there a better way to set these conditions, maybe in a tool.uv section? Any tips would be super helpful!
$ uv --version
uv 0.5.5Related to #8358.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionAsking for clarification or supportAsking for clarification or support