-
Notifications
You must be signed in to change notification settings - Fork 5
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
Doesn't work with current pdm #12
Comments
Hey @mattiadg! I did a PR for this pre-vacation but haven't merged it yet. I'll try to get a release out this week! #11. Of course, 2.8 is out since then, but I think the specific one you see is fixed. If you can try the branch on 2.8 and see if it works for you I'd be very happy to mark 2.8 supported too. |
I tried v23.2.0 on PDM v2.7.4 and it works, but anything later than that breaks with this error: pdm.exceptions.CandidateNotFound: No candidate is found for `torch` that matches the environment or hashes
|
Hmm. Can you share the full config you're using? This sounds like an upstream bug but I would like to validate that before I go bother them. |
For reproducing the error, I'm following PDM's other installation methods via pyprojectx. Here is my pyproject.toml: [tool.pdm]
[project]
name = ""
version = ""
description = ""
authors = [
{name = "danielphan2003"},
{name = "Daniel Phan", email = "[email protected]"},
]
dependencies = []
requires-python = ">=3.11"
license = {text = "MIT"}
readme = "README.md"
[tool.pdm.scripts]
post_install = "pdm plugin add pdm-plugin-torch==23.2.0"
[tool.pdm.plugins.torch]
dependencies = [
"torch==2.0.1"
]
enable-cpu = true
enable-cuda = true
cuda-versions = ["cu118"]
[tool.pyprojectx]
pdm = "pdm==2.9.3"
# commonly used tools
#black = "black"
#isort = "isort"
#pylint = "pylint"
#pre-commit = "pre-commit"
#jupyter = ["jupyter", "."]
[tool.pyprojectx.aliases]
install = "pdm install"
run = "pdm run"
outdated = "pdm update --outdated"
test = "pdm run pytest"
# example aliases
#clean = "rm -rf .venv .pytest_cache dist"
#clean-all = "pw@ clean && rm -rf .pyprojectx"
#black = "black src tests"
#isort = "isort src tests"
#check-pylint = "pylint src tests"
#check-black = "black src tests --check"
#check = "pw@ check-black && pw@ check-pylint && pw@ test"
#build = "pw@ install && pw@ check && pw@ pdm build"
#notebook = "jupyter notebook -y"
[tool.pyprojectx.os.win.aliases]
# example os specific aliases
#clean = "rmdir /s/q .venv .pytest_cache dist"
#clean-all = "pw@ clean & rmdir /s/q .pyprojectx" My exact commands were: curl -LO https://github.com/pyprojectx/pyprojectx/releases/latest/download/wrappers.zip && unzip wrappers.zip && rm -f wrappers.zip
./pw --init pdm
./pw pdm install
./pw pdm torch lock
./pw pdm torch install cu118 |
Thanks, added it to our backlog and will try to look soon. I'm eyeing pdm-project/pdm#2102 if it stopped working between 2.7.4 and 2.8.0, but there might be some changed API we're now misusing. |
This is ~sort of fixed in the next release, hopefully made this afternoon. Unfortunately the fix doesn't work due to pdm-project/pdm#2151 only being available in 2.9, so PDM 2.8 can't be supported without a lot of work. |
Hi,
thank you for developing this useful plugin.
I was wondering if there are plans to make it work with the current version of pdm. I also tried using the code from the open PR but still getting
missing required argument config_prefix
.I would be happy to help if it would be useful.
The text was updated successfully, but these errors were encountered: