I want to use sktime for time-series classification inference on a Raspberry Pi. I am not able to install it properly with the required dependencies, especially of numpy and numba. When I run pip install sktime
it installs correctly and also import properly. But when I try to use fit
or predict
it throws an error.
pip install sktime
# In python interpreter
import numpy as np
from sktime.classification.kernel_based import RocketClassifier
rocket = RocketClassifier(num_kernels=2000)
X_train = np.array([[[1,2,3,4,4,5]], [[1,2,3,4,5,5]], [[1,2,4,5,6,7]]])
y_train = np.array([0, 0, 1])
rocket.fit(X_train, y_train)
This gives.
UnsupportedParforsError: Failed in nopython mode pipeline (step: nopython mode backend)
The 'parallel' target is not currently supported on 32 bit hardware.
During: lowering "id=0[LoopNest(index_variable = parfor_index.62, range = (0, X_size0.1, 1)), LoopNest(index_variable = parfor_index.63, range = (0, $50binary_multiply.23, 1))]{335: <ir.Block at /home/sashi/.local/lib/python3.9/site-packages/sktime/transformations/panel/rocket/_rocket_numba.py (180)>}Var($parfor_index_tuple_var.69, _rocket_numba.py:180)" at /home/sashi/.local/lib/python3.9/site-packages/sktime/transformations/panel/rocket/_rocket_numba.py (180)
I believe it because the numpy
and numba
versions are incompatible.
numba 0.52.0
numpy 1.21.1
I tried pip install numba==0.53.0
but install fails with Failed to build llvmlite
.
My platform is:
- Current OS
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
11.7
- Kernel
6.1.21-v7+
- Architecture
armv7l
- Model
Raspberry Pi 3 Model B Rev 1.2
How to install sktime on raspberry pi?
Any help if greatly appreciated!
Looking at the error it appears that the sktime model roket_numba
only works on 64 bit architercture.
You are running a 32 bit version of Raspbian and that is the problem.