Open jennifgcrl opened 3 weeks ago
I think that setup.py's mechanism of deciding which frameworks to build based on presence in the current python environment is incompatible with how uv works, i.e., packages are built in a clean python environment.
TE has these hard-coded Pip calls to work around two problems:
The "right" solution to 1 is adding a pyproject.toml
(see https://github.com/NVIDIA/TransformerEngine/pull/981 and https://github.com/NVIDIA/TransformerEngine/pull/1061). One problem is that most users will want to disable build isolation (especially when using NGC containers with optimized PyTorch builds), and it's quite annoying we can't make that the default. We may just need to bite the bullet.
Fixing 2 is trickier and would require a revamp of our build infrastructure. It seems to me that the right approach is to install separate framework packages when building from source, so that the structure matches the PyPI case. Pinging @ksivaman.
If you can't rely on automatically detecting which DL frameworks are installed, then the best approach is to set NVTE_FRAMEWORK
in the environment (see docs). You can also manually set the DL framework when installing from PyPI with something like pip install transformer_engine[jax]
(so I assume uv pip transformer_engine[jax]
?).
setup.py
calls uninstall_te_wheel_packages which fails becausepip
is not a module. This is expected because I use uv instead of pip. I think TransformerEngine should not assume pip.Full error: