Open ryxli opened 3 months ago
Hard for me to test this because it requires CUDA it seems?
But setuptools.build_meta:__legacy__.build_editable
is just the build hook to build the editable -- it's not uv code, but Python code following the standards.
It seems like pip isn't performing a build? Do their verbose logs have more information?
I think pip actually doesn't use PEP 517 when doing editables, or something like that.
Hard for me to test this because it requires CUDA it seems?
Unfortunately this package requires cuda, although the issue related to the install time does not seem related from what I can tell
It seems like pip isn't performing a build? Do their verbose logs have more information?
I did not include the whole logs as on first install most of the time is spent building cpp extensions via cmake. The cmake build is done incrementally, so it doesn't affect the tests above which is when I noticed this significant time difference just comparing uv and pip install.
The uv pip install just hangs on this line for a while, after which the install seems just as fast as regular pip.
DEBUG Calling `setuptools.build_meta:__legacy__.build_editable("/root/.cache/uv/.tmpKghDdN/.tmphfHmSb", {}, None)`
It's possible there may be something else going on under the hood, as cmake logs are not exposed via uv pip install (https://github.com/astral-sh/uv/issues/1567). But for regular pip, I can get the logs and it seems relatively fast, so unsure what the issue is (10-15 seconds vs 1-2 minutes)
Is there a particular setup you have? Can you try on a fully clean environment, e.g. docker image?
This is while trying to build a docker image
Which docker image base were you using?
Thanks, I was attempting it earlier in a nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
image and was getting relatively same build times across both. I will try using nvcr.io/nvidia/pytorch:24.04-py3
, but from a quick glance it seems transformer-engine is already pre-built in it which could explain some of the speed differences.
This is after uninstalling transformer_engine n in the base image, and then installing it from src
Would like some help or pointers with identifying the reason for the performance different between pip and uv pip install for a package (https://github.com/NVIDIA/TransformerEngine)
Reproduce steps:
With regular pip:
With uv pip:
With --verbose enabled, the command seems to get stuck at
Calling setuptools.build_meta:__legacy__.build_editable
for a long while: