-
Notifications
You must be signed in to change notification settings - Fork 803
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
Pytorch downgrades to a lower version #6880
Comments
Example of downgrading torch (and installing cuda extensions which are not needed)
|
This doesn't work today with |
@charliermarsh how do I respect pyproject.toml and use project setup features? I thought of switching to uv as a project management tool (similar to poetry or rye if that matter). Will |
Yeah E.g., activate that virtual environment, then run |
@charliermarsh This doesn't work
It still installs torch==2.4.0 even though it's not in the dependencies of pyproject.toml I verified that inside this venv torch is installed |
@charliermarsh I have tried to set
but it can't be resolved
|
@thepowerfuldeez -- If you're trying to use packages from the system Python, you'll need to use |
@charliermarsh Thank you so much! It works now! So the solution is not using lockfile for now, right? |
Unfortunately yes. We'll need to think on how to solve this properly. |
I'm gonna leave the issue open but might tweak the title and add some more details on the underlying problem, if that's ok. |
I had the same issue with poetry some time ago: python-poetry/poetry#6035 (resolved by python-poetry/poetry#8359). Note |
@charliermarsh it seems like there might be a real issue to track here? |
Yeah. The system packages aren't taken into account. |
Hi! Is there functionality to ignore dependencies if they are already exist in the system python?
I am using
nvcr.io/nvidia/pytorch:24.08-py3
docker image which haspytorch==2.5.0a0+872d972e41.nv24.08
installedI followed guide from here to enable system python via
UV_SYSTEM_PYTHON=1
and I havepyproject.toml
that includes packages that I've put from requirements.txt and madeuv lock
.But now I see that it's been resolved with
torch==2.4.0
and when I runuv sync
my pytorch gets downgraded to2.4.0
which is unexpected.I have tried to manually remove all pytorch dependencies from lockfile and run
uv sync
from that state, but for some reason now it suceeds with installing only 4 of 126 packages (and they are just file packagesfrom file://...
defined in pyproject.toml)I've tried using
uv sync --frozen
uv sync --locked
and tried creatinguv sync
with different variations but haven't suceeded yet. To be frankpip install -r requirements.txt
would also downgrade mytorch
unless I makepip freeze > requirements.txt
and install with-r --no-deps
but this is not favorable.I generally lack understanding of such intricacies and I've noticed that other people stumble with flash-attn installation or CUDA extensions. I wonder what's the best way to handle such conflicts?
Thank you very much for modern replacement of pip!
The text was updated successfully, but these errors were encountered: