Closed rmndrs89 closed 1 month ago
@rmndrs89 Pomegrante is an optional dependency, so yes you always have to install it manually or by using the provided extra. Additionally, pomegranate does not support Python >=3.10. So it is likely that you are not able to install it all if you are not using Python 3.9.
See installation instructions for the HMM part in the README:
To use the HMM (anything imported from gaitmap.stride_segmentation.hmm) based algorithms make sure you install gaitmap with the hmm extra.
pip install gaitmap_mad "gaitmap[hmm]" --upgrade
This installs the pomegranate package, which is the basis for the HMM implementation. Note, that we only support the pomegranate version >=0.14.2,<=0.14.6 and that pomegrante is not compatible with Python 3.10.
I just double checked. When using Python 3.9 things work as expected. When using Python 3.10 or later, pomegrante will (silently) not be installed. Might be a good idea to catch the import error and provide some context...
Can you confirm that the wrong Python version is also the issue in your case?
Hi @AKuederle ,
Yes, you are right 👍 I have an environment with Python 3.10.
Does this also hold for pomegranate 1.0.0?
Pomegranate 1.0 is a complete rewrite using pytorch as backend. This is great, but the API changed completely and multiple pieces of functionality that we relied on are not available at all anymore. There is a branch where I tried to rewrite the hmm logic with the 1.0 version, but I couldn't get it to work.
Hi all,
after installing
gaitmap
andgaitmap_mad
using poetry (i.e.poetry add gaitmap gaitmap_mad
), I was trying to run a stride segmentation on some data with the Nils Roth HMM, like:I get the following error:
I have tried to install
pomegranate
separately with the same restrictions as in thegaitmap
pyproject.toml, but this did not help.Is this a known issue, and what will be the workaround?