Error Training NN Classifier on Accelerometer Data

I used the edge-impulse-data-forwarder to capture accelerometer data from an Arduino Nano 33 IoT. This has the LSM6DS3 IMU. Training the model worked perfectly the first time.

After a few days, I deleted some of the training data and did a fresh capture. An attempt to train the model yields an error that would be related to a Numpy version issue with the following output:

Creating job… OK (ID: 2057114)

Job started
Splitting data into training and validation sets…
Traceback (most recent call last):
File “/home/”, line 299, in
File “/home/”, line 127, in main_function
X_train, X_test, Y_train, Y_test, X_train_raw =
File “/app/./resources/libraries/ei_tensorflow/”, line 72, in split_and_shuffle_data
Y = np.load(os.path.join(dir_path, y_train_path), mmap_mode=‘r’)[:,0]
File “/usr/local/lib/python3.8/dist-packages/numpy/lib/”, line 444, in load
raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

Application exited with code 1 (Error)

Job failed (see above)

Hello @johnthas,

Just to make sure, have you regenerated the features too?
This step extracts the features from your raw data and the neural network trains on these features, if you deleted some files, the issue potentially comes from there.

Let me know,



Hi Louis,

Regenerating features fixed that issue. Thank you very much :smiley:

1 Like

@johnthas the allow_pickle issue has been fixed, and will be released in the next patch release (probably today). The underlying issue was that we were copying features from DSP => ML block but waiting for the finished event on the read stream, rather than the write stream. Because of this we sometimes start jobs before the features file was completely written, leading to a corrupt file.

(Also this is why regenerating or restarting jobs typically solved the issue).