Open VDuchauffour opened 1 year ago
Is there a danger with this that torch could be downloaded and installed automatically without the user picking which build they want? For example, they end up with a torch build corresponding to the wrong CUDA version?
A +1 on this issue as well, I'm trying to use pip compile for requirement management with your package and it breaks expecting torch in the environment doing the pip compile. This is caused by the implied inclusion of torch in the environment doing the compiling when that can't be guaranteed, due to setup.py torch import. I believe this addition would also fix that problem as well.
A +1 on this issue as well, I'm trying to use pip compile for requirement management with your package and it breaks expecting torch in the environment doing the pip compile. This is caused by the implied inclusion of torch in the environment doing the compiling when that can't be guaranteed, due to setup.py torch import. I believe this addition would also fix that problem as well.
This part is confusing to me, similar to the previous question I asked. Are you suggesting having a pyproject.toml which does not mention torch? Otherwise how would its presence help?
@bottler I don't think it is a real issue if torch were automatically installed. Yes, it would install the default torch if it wasn't installed yet, but it would simply keep the existing torch if it was already there. I think it is the responsibility of the user / whatever package that uses pytorch3d to ensure that its dependencies are sufficiently specified for this not to happen.
For example, it is currently not an option to specify pytorch3d as a git dependency. Automatic installation will fail even when torch is specified as a second dependency, because pip has no idea that torch has to be installed before pytorch3d. This always adds unnecessary manual installation steps that could be avoided.
Maybe adding torch as a dependency and adding a few checks that stops the pytorch3d installation if the torch + cuda version doesn't match the versions pytorch3d expects is an option?
Could you please tell me if there is any plan for this to be fixed? As I understand, till this is not fixed, we are unable to use pytorch3d with poetry on our project, due to pytorch3d's undeclared build-time dependency on torch.
Alternatively, what workaround would you be able to recommend for us to install the pytorch3d library using poetry, if this issue is not planned to be fixed?
poetry add https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1121/pytorch3d-0.7.2-cp38-cp38-linux_x86_64.whl
this works, if you properly define your toml to use the proper torch and python versions
poetry add https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1121/pytorch3d-0.7.2-cp38-cp38-linux_x86_64.whl
this works, if you properly define your toml to use the proper torch and python versions
This not even close to a proper solution, at least not if we could find the url for our specific version of py, cu and pyt
poetry add https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1121/pytorch3d-0.7.2-cp38-cp38-linux_x86_64.whl
this works, if you properly define your toml to use the proper torch and python versionsThis not even close to a proper solution, at least not if we could find the url for our specific version of py, cu and pyt
(It is not intended to be. The supported binary builds are the conda ones.)
🚀 Feature - Adding PEP517 metadata
The PEP517 introduces a possibility to build packages isolated from the runtime environment. Currently no metadata for the build are provided, so it seems impossible to install Pytorch3D with a tool like
poetry
orpdm
. For instance, trying to install Pytorch3D with the commandpoetry add git+https://github.com/facebookresearch/pytorch3d.git
gives this error:Like for Torch (here), adding a
pyproject.toml
file with the following content could fix the issue. It from this issue.Would you accept to adding this ? Thank you