Description
I encountered a ModuleNotFoundError while running the server. The error occurs when the script attempts to load the model using pickle. It specifically states that there is no module named 'sklearn.linear_model.base'.
Error Details :
loading saved artifacts...start
Traceback (most recent call last):
File "C:\Code\BHP\server\util.py", line 47, in
load_saved_artifacts()
File "C:\Code\BHP\server\util.py", line 37, in load_saved_artifacts
__model = pickle.load(f)
ModuleNotFoundError: No module named 'sklearn.linear_model.base'
Context:
This error is occurring in the load_saved_artifacts() function within util.py. The issue seems to be related to the loading of the machine learning model using pickle. It suggests that the necessary module or package (sklearn.linear_model.base) is not found during the loading process.
Potential Solutions Attempted:
Module Installation: I have attempted to install the required module using pip, but the issue persists.
Alternative Approach: I have also tried using joblib as an alternative to pickle for model persistence, but the error still occurs.
Additional Notes:
The server and utility files seem correct, but there might be an underlying issue with the environment or dependencies.
It's possible there could be a conflict between different versions of libraries or an issue with the Python environment configuration.
Any assistance in resolving this issue would be greatly appreciated.