-
Notifications
You must be signed in to change notification settings - Fork 904
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
uv pip compile
Ignores Lower Bound for Transitive Dependency
#9322
Comments
I think that may have been added since the most recent Metadata-Version: 2.1
Name: shap
Version: 0.46.0
Summary: A unified approach to explain the output of any machine learning model.
Author-email: Scott Lundberg <[email protected]>
License: MIT License
Project-URL: Repository, http://github.com/shap/shap
Project-URL: Documentation, https://shap.readthedocs.io/en/latest/index.html
Project-URL: Release Notes, https://shap.readthedocs.io/en/latest/release_notes.html
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: scikit-learn
Requires-Dist: pandas
Requires-Dist: tqdm >=4.27.0
Requires-Dist: packaging >20.9
Requires-Dist: slicer ==0.0.8
Requires-Dist: numba
... |
Yeah, it looks like the last release was in June but that constraint was committed in October. |
If you install from Git, we should respect it (as expected). Otherwise, you'll need to ask the |
(Happy to answer follow-up questions.) |
Thank you for the prompt reply @charliermarsh! Yeah, the That said, and this might be slightly out of scope for this issue, I'm still trying to fully grasp how |
It's a specific issue with recent Numba and NumPy releases. pip-compile generates a different resolution, but both resolutions are technically valid. The main issue tracking that kind of undesirable solution is here: #8157. I wrote up an explanation of the specifics of Numba and NumPy here: #6281 (comment). |
Makes sense to me, thank you for the clarification! |
Hello
uv
team! 👋First, I want to express my gratitude for the effort and dedication you’ve put into building and maintaining
uv
. It’s a fantastic tool, and I’ve been enjoying exploring its capabilities.That said, I recently encountered a small issue while trying to compile dependencies with
uv
. Below are the details:Environment
uv 0.5.3 (56d362208 2024-11-19)
MacOS Sequoia 15.1.1
,Python 3.12.7
Steps to Reproduce
Given the following input file
reqs.in
:When running the command:
Observed Behaviour
The resulting
reqs.txt
includes a pinned version ofnumba
that does not respect the lower bound specified in theshap
library'spyproject.toml
file:However, as specified in shap's pyproject.toml, the dependency for numba should have a lower bound of
>=0.54
.From the verbose output, we see:
This indicates that
uv
did not pick up the correct lower bound fornumba
. The next steps, however, appear to have executed correctly. For example:It found the latest version of
numba
that doesn't have an upper bound of an acceptednumpy==2.1.3
Expected Behaviour
The compiled reqs.txt should respect the lower bound for
numba
and pin a version>=0.54
that is compatible with other dependencies. For instance,pip-compile
correctly produces an output that includes:Workaround
Adding an explicit requirement to
reqs.in
resolves the issue:Thank you again for all the incredible work you’re doing with
uv
. Let me know if you need additional details.The text was updated successfully, but these errors were encountered: