gmm-torch
gmm-torch copied to clipboard
Make pip installable
This enables you to install it with:
pip install git+https://github.com/ldeecke/gmm-torch
rather than cloning and copying the code into a codebase
Makes sense and looks good in principle — thanks for the PR! 👍
Some suggestions:
- could rename from
gmm_torch/gmm.pytogmm/model.py {example,test.py}seem to loose their functionality- what is the rationale for dropping
torchfrom requirements?
Regarding dropping torch, I’ve noticed it will often mess up installations of torch when you put it in setup. For example, if you’ve installed the GPU version, the setup.py might make pip switch it to the CPU version. So it’s better to assume someone will install pytorch manually using the steps on https://pytorch.org/get-started/locally/ which vary by platform and accelerator.
It would be great to have this available in PyPI; it would make it much easier to use and ensure that downstream packages are getting any updates or bugfixes. It's possible (and really quite easy) to set up GitHub actions to upload to PyPI every time you make a release in GitHub, see for example in one of my packages here: https://github.com/Linux-cpp-lisp/opt_einsum_fx/blob/main/.github/workflows/release.yml
Also just seconding @MilesCranmer 's point about torch as a dependency... I've never seen pip do anything sane or helpful with it, but it's definitely ruined a lot of environments and wasted a lot of bandwidth.