mammoth-truck-89764
01/04/2025, 11:02 PMxformers
; I got around it by pinning it to a specific wheel in pyproject.toml
I have an exported symlinked_immutable_virtualenv
that I generally use for my IDE.
I just noticed that xformers
never got installed (from wheel) even though it’s there in the lock.
I just re-exported it as mutable_virtualenv
and xformers
seems to be there (yay)
Inquiries:
1/ Is the different outcomes between the export-flags, a feature or a bug?
2/ The reason xformers is a pain to build is because of its build-time dependency on torch. I don’t know if there’s a good way to handle this with pants. I know we can specify runtime-overrides but since this is at build-time, I believe is irrelevant. I’ve also tried to leverage pyproject.toml [build-system.requires]
to include torch, without success.mammoth-truck-89764
01/04/2025, 11:08 PMpython_requirements(
name="ml-service",
source="path/to/pyproject.toml",
resolve="ml",
)
My pyproject.toml looks like:
dependencies = [
"torch==2.2.2",
"torchaudio==2.2.2",
"torchvision==0.17.2",
"xformers @ <https://download.pytorch.org/whl/cu118/xformers-0.0.25.post1%2Bcu118-cp311-cp311-manylinux2014_x86_64.whl>",
]
Lock & export
pants --pex-verbosity=9 generate-lockfiles --resolve=ml
pants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=ml
pants export --py-resolve-format=mutable_virtualenv --resolve=ml
happy-kitchen-89482
01/06/2025, 8:21 PM