Open tbng opened 1 month ago
Would you mind opening a PR ?
For me this is related to #18
I would suggest to keep the Dnn learner in a separate module with additional requirements to avoid the dependency of hidimstat
on Pytorch
I'm not a big fan of having code disseminated on several packages. I'd rather have auxiliary code for learners on a dedicated submodule.
After checking a bit I got the package installed with
pip install -U git+https://github.com/mind-inria/hidimstat.git
without the requirements.txt as there are already torch requirements in pyproject.toml
; this only works with python 3.12 but not 3.13 though. I think it will be less of a hassle to edit the README.md to remove dependencies section than adding requirements.txt which needs updating for every new version. One thing to keep in mind is that Pytorch nowadays is very heavy to download and install so indeed @jpaillard offered a good proposal :+1:
Beside that, using
pip install hidimstat
installed version 0.1.0 instead and therefore did not cover torch installation.
I'm not a big fan of having code disseminated on several packages. I'd rather have auxiliary code for learners on a dedicated submodule.
It seems adding additional requirements for submodule is also possible so I am in favor of Bertrand's solution: https://stackoverflow.com/questions/56959413/how-to-resolve-dependencies-of-python-git-submodule (I suspect it can be done inside pyproject.toml
)
Indeed, it seems we can use the [project.optional-dependencies] (https://github.com/mind-inria/hidimstat/blob/fe4836fa2e2b501b46455cc9d1d0695a849662dd/pyproject.toml#L36). Maybe a "learners" group of dependencies could be added.
I'm wondering why pip install hidimstat
gets the old version ?
I'm wondering why
pip install hidimstat
gets the old version ?
I tried to check and this is only the case if python version is not 3.12 -- pip will install hidimstat 0.1.0. I think it is safer to recheck it in a different computer as well, for example running
conda create -n hidimstat310 python=3.10
conda activate hidimstat310
pip install hidimstat
Indeed it get hidimstat 0.1.0
I think this is because in pyproject.toml
the requirement for python is 3.12 or newer, so with older python the pypi installation reverts to older version
There is also an important missing requirement on Pytorch with the MLPs modules in
utils.py
. Pytorch installation is not the most straightforward with additional dependency on CUDA version (that also needs elaboration).