Replies: 1 comment
-
I've done some further testing, and I think I did something not too carefully in my earlier testing. Using this in my
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm developing a PyTorch project on a Mac, and I would like to be able to handle via PDM the lockfile(s) needed to handle running the project on arm64 Mac, amd64 Linux, and amd64 Linux with CUDA. For all packages except
torch
this is fine basically as is, but the 3 targettorch
versions live in different package indexes.My ideal solution would be for
[[tool.pdm.source]]
declarations to have a scope parameter that I can use to instructpdm
to only use this source for [applicable] packages declared within a specific[project.optional-dependencies]
group. From what I can tell, this is not possible.Continuing, I tried specifying different
torch
versions in different optional groups, e.g.:But that is a conflict of dependencies, apparently, between these 2 optional
torch
declarations, and notorch
in the main dependencies.Then I found that there was a suggested way to pin a specific wheel. This is not very ergonomic, and I also am not sure how it would even work if I got a dependency conflict with the same thing in different optional groups.
Further in that discussion, however, #696 is referenced for
find-links
source. I'm not sure that I understand how that works. I tried this:Running
pdm lock
afterwards did fail with aCandidateNotFound
error. However, going to both of these URLs I spotted that thetorch
package link resolves to the same URL. What I did then is replace the 2 sources above with this:And that kind-of worked, inasmuch as getting
torch
wheels goes:But this does present a few separate questions, that I cannot answer on my own at the moment:
version = "2.1.1+rocm5.6"
in some unclear way?I don't mind generating platform-specific lock files, if that is possible, but I would strongly prefer to be able to solve this out of a single
pyproject.toml
file. The problem, to clearly restate, is the ability to givepdm
an instruction to install a specific subset oftorch
wheels (CPU/CUDA/ROCm flavour), out of different indexes, at any given occasion.Beta Was this translation helpful? Give feedback.
All reactions