Open jacob-ango opened 2 years ago
Looks like the model may have been trained with a newer version of scikit learn than what’s available on the RPi. Please try to SSH into the raspberry pi and run the following command
pip install -U scikit-learn
If it still doesn’t work, can you check the version of sklearn on the RPi using pip show scikit-learn
Maybe try replacing pip in the commands above with pip3
Thank you so much! It worked!
Getting the same error message. Using pip install -U scikit-learn or pip3 install -U scikit-learn did not help. Produces the following response.
@cybrkatt Try downgrading/upgrading the version of scikit-learn on your computer to the same version that is installed on your Pi.
That did it, thank you!
Hi, I get the same error. I tried all the solutions above but still, I get the same result
.
Hi, I get the same error. I tried all the solutions above but still, I get the same result
.
Can you help me with this please.
Which environment is used to train the model ml_course or ml_course_32?
Which environment is used to train the model ml_course or ml_course_32?
None of them. I used Pycharm to train my model. then I saved the model and now I am sending it to the RPi.
Hi again I tried downgrading the sklearn and now I get this error. Could you help me with this, please?
When you say you tried downgrading, do you mean on the RPi, or the one in the environment used to train the model?
The version on the RPi has to match the version used while training and saving the model. If the latest version have issues, you can try downgrading to an earlier version, but you still have to do it on both.
Hi, I have installed scikit-learn. The version 1.0.2 is shown in below figure. It still doesn't work. And the version I used to trained in Anaconda is 0.24.2.
Make sure your pi is running the same version. You can pip3 install scikit-learn==0.24.2
Make sure your pi is running the same version. You can
pip3 install scikit-learn==0.24.2
It can works now. But the recall value and F1-Score are zero in the result. Is that means the model I selected is not right?
Possibly, you can always compare with the results you get if you evaluated the model on your PC, which should be the same. I'd also recommend going through the results file where the processed data is saved and you can see for yourself if the numbers make sense. You may have the wrong model or the wrong inputs or the right inputs in the wrong order (which makes them wrong too)
We were able to successfully run the model on the Pi for lab 1, however when we try and process the data for lab 2 we receive the error: ERROR: Acknowledgment Failed, received: EXCEPTION: Problem opening the current model with path /home/pi/SFU_ML/RPi_Script/saved_models/Model_knn.pkl because of exception: No module named 'sklearn.neighbors._dist_metrics' So I tried to reinstall the scikit-learn package, but that did not fix the problem. I also followed all the steps you outlined in the video as well for debugging errors when trying to run the model, but all of them produced the same error. I uploaded a photo as well showing what the processing log tells us when we try and run it. If you have any ideas how to fix this issue, it would be greatly appreciated thank you.