-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Incorrect resolution for JAX #2369
Comments
Fixes #2369 Signed-off-by: Frost Ming <[email protected]>
Not sure if it is related, but I get this error with $ pdm install
Lock file does not exist
Updating the lock file...
🔒 Lock failed
Unable to find a resolution for jaxlib
because of the following conflicts:
jaxlib==0.4.20+cuda12.cudnn89 (from [email protected])
To fix this, you could loosen the dependency version constraints in pyproject.toml. See https://pdm-project.org/latest/usage/dependency/#solve-the-locking-failure for more details.
See /tmp/pdm-lock-dfwb8ku8.log for detailed debug log.
[ResolutionImpossible]: Unable to find a resolution
Add '-v' to see the detailed traceback In this toy example, My current workaround is to manually specify the necessary dependencies of jax[cuda12_pip] as listed here: https://github.com/google/jax/blob/c5d6df4557c1f0bf543a1315fca3bf203bc2201d/setup.py#L128 Environment information# Paste the output of `pdm info && pdm info --env` below:
PDM version:
2.10.1
Python Interpreter:
/home/myuser/path/.venv/bin/python (3.11)
Project Root:
/home/myuser/path/
Local Packages:
{
"implementation_name": "cpython",
"implementation_version": "3.11.6",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_release": "6.5.0-10-generic",
"platform_system": "Linux",
"platform_version": "#10-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 13 13:49:38 UTC 2023",
"python_full_version": "3.11.6",
"platform_python_implementation": "CPython",
"python_version": "3.11",
"sys_platform": "linux"
} |
I'm experiencing the same issue as @mthiboust on PDM 2.11. The workaround of adding the other dependencies explicitly did not seem to work for me; instead, I resorted to adding the |
I am trying to specify JAX as a dependency for my project, but currently it is not resolved correctly by PDM.
For some additional context. JAX depends on a native dependency
jaxlib
for correct operation. This requires the user to specify the extra (e.g., jax[cpu], jax[cuda]) to install the correct jaxlib variant, where the CPU variant uses a version and the GPU wheels use a local version identifier to differentiate from the CPU one (and the user needs to use JAX's find link).Steps to reproduce
The following pyproject resolves incorrectly
If I run
pdm lock -G cpu
and the lockfile looks likeFor
pdm export -G cpu
I getActual behavior
There are a few issues with the resolution above
pdm install
as jaxlib is also not installed.This is not expected.
Expected behavior
I expect that when using the CPU group to install dependencies, jaxlib should be included as a dependnecy.
Environment Information
Updates
I tried a few things, it seems that if you also pin the version in extra then things work, but I find that to be surprising.
The text was updated successfully, but these errors were encountered: