Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'acconeer.exptool.a121._core.peripherals' #3

Open
thedevleon opened this issue Dec 8, 2023 · 2 comments

Comments

@thedevleon
Copy link

thedevleon commented Dec 8, 2023

I'm trying to run the model_deployment.ipynb notebook and have the acconeer-exptool installed in a venv with python 3.12.
I can open the exptool-app just fine.

> pip install acconeer-exptool                                                                                                                                                                   
Requirement already satisfied: acconeer-exptool in ./venv/lib/python3.12/site-packages (7.7.1)

> python -m acconeer.exptool.app
[Exploration Tool opens...]

However, trying to run the first cell in the notebook already gives me an error:

from util import get_processing_config
processing_config = get_processing_config()
print("Gesture Detection classes:", processing_config["gd_gestures"])
print("Gesture Classification classes:", processing_config["gc_gestures"])
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], [line 1](vscode-notebook-cell:?execution_count=1&line=1)
----> [1](vscode-notebook-cell:?execution_count=1&line=1) from util import get_processing_config
      [2](vscode-notebook-cell:?execution_count=1&line=2) print(get_processing_config())

File [~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:3](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:3)
      [1](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:1) import numpy as np
      [2](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:2) from enum import Enum
----> [3](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:3) from acconeer.exptool.a121._core.peripherals import load_record
      [5](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:5) from acconeer.exptool.a121.algo._utils import get_approx_fft_vels
      [6](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:6) import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'acconeer.exptool.a121._core.peripherals'
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[4], [line 1](vscode-notebook-cell:?execution_count=4&line=1)
----> [1](vscode-notebook-cell:?execution_count=4&line=1) from util import get_processing_config
      [2](vscode-notebook-cell:?execution_count=4&line=2) processing_config = get_processing_config()
      [3](vscode-notebook-cell:?execution_count=4&line=3) print("Gesture Detection classes:", processing_config["gd_gestures"])

File [~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:3](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:3)
      [1](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:1) import numpy as np
      [2](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:2) from enum import Enum
----> [3](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:3) from acconeer.exptool.a121._core.peripherals import load_record
      [5](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:5) from acconeer.exptool.a121.algo._utils import get_approx_fft_vels
      [6](https://file+.vscode-resource.vscode-cdn.net/home/leon/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/~/Desktop/dev/radar/AccoNeer/acconeer-a121-gesture-control/util.py:6) import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'acconeer.exptool.a121._core.peripherals'

Do I need to install a different version of the exptool?

Also, maybe related, but I cannot open any of the recordings in /data either, see acconeer/acconeer-python-exploration#134

@thedevleon
Copy link
Author

Fixed by installing

pip install acconeer-exptool==6.0.5

The version of the exptool should really be pinned somewhere, i.e. a requirements.txt

@HuyHung0
Copy link

HuyHung0 commented Jul 29, 2024

You can change the import line in utils.py file

from acconeer.exptool.a121._core.peripherals import load_record

to

from acconeer.exptool.a121 import load_record

The same thing can be done with the import line in realtime_deployment.py file

from acconeer.exptool.a121._core.peripherals import load_record

To run the file, you also need to do some additional modification due to changing in numpy and keras

  • In model_development.ipynb,
    • in the line segments = np.concatenate((segments, np.array([features[i:i+gd_window_length]], dtype=np.float)), axis=0), change np.float to float.
    • in the box which has
gc_model = Sequential(normalization_layer)
gc_model.add(Dropout(0.2))
gc_model.add(LSTM(40, recurrent_dropout=0.2, input_shape=(None, gc_X_train.shape[2])))
gc_model.add(Dense(units=30, activation='relu'))
gc_model.add(Dropout(0.2))
gc_model.add(Dense(units=20, activation='relu'))
gc_model.add(Dropout(0.2))
gc_model.add(Dense(len(gc_gestures), activation='softmax'))

change to

gc_model = Sequential([
    normalization_layer,
    Dropout(0.2),
    LSTM(40, recurrent_dropout=0.2, input_shape=(None, gc_X_train.shape[2])),
    Dense(30, activation='relu'),
    Dropout(0.2),
    Dense(20, activation='relu'),
    Dropout(0.2),
    Dense(len(gc_gestures), activation='softmax')
])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants