-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetry selects wrong version for nightly PyTorch on OSX #6150
Comments
I think poetry behaviour is unlikely to change here. You'll perhaps do better asking the pytorch project to use a consistent versioning scheme - it looks a lot like an accident that macosx is treated differently from the others and if so they'll surely welcome a bug report / fix. |
Closing this as it can be solved with multi-constraint versions, and it's external to Poetry. |
@neersighted can you elaborate on how to solve this with multi-constraint versions? Is this something I can do now as a user? |
You can add an additional constraint for macOS that depends on the macOS version number (and keep the |
I tried that, but it doesn't work (assuming the constraint you meant was I'm pretty sure >>> sys.platform
'darwin' torch = [
{ version = "==1.13.0.dev20220811,!=1.13.0.dev20220811+cpu", platform = "darwin", allow-prereleases = true, source = "pytorch-nightly-cpu" },
{ version = "==1.13.0.dev20220811", platform = "linux", allow-prereleases = true, source = "pytorch-nightly-cpu" }
]
|
Sorry, I realize now that Poetry doesn't consider the two version numbers to be different in a multiple constraint entry. I would suggest solving this by using Poetry's normal resolution on non-macOS platforms and hardcoding direct URL dependencies to the macOS wheels using the correct platform markers. The long-term fix to allow proper resolution would be consistent versioning. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
I'm trying to install the nightly build of PyTorch, so that I can use the new MPS acceleration.
Adding the PyTorch index as a source works (in 1.2.0b3, but not 1.1.14):
But poetry selects the
1.13.0.dev20220811+cpu
version, which does not have an build for OSX:adding the dependency directly to
pyproject.toml
also doesn't work but gives a different error:Looking at the PyTorch index, we see that indeed there are no builds tagged +cpu for OSX - the OSX builds do not have a local version specifier: https://download.pytorch.org/whl/nightly/torch/
poetry should select
1.13.0.dev20220811
, not1.13.0.dev20220811+cpu
. This is what pip does:The text was updated successfully, but these errors were encountered: