I got this error when try to load my ML model using pickle, i checked my requirements and everything are correct. Can anyone help me with this problem, thanks!
This is my apps:
This is my github:
I got this error when try to load my ML model using pickle, i checked my requirements and everything are correct. Can anyone help me with this problem, thanks!
This is my apps:
This is my github:
I assume that the data types from the pickle file are unknown at the time of loading. I would therefore also add the libraries used to create the model as an import
statement in the predict.py
file.
Thanks for the suggestion, just try it, but still the same error
IMHO pickling ML models can cause all sorts of problems.
After inspecting your pickle file i assume the following ML library versions were used during the ML model creation, but i could be wrong.
scikit-learn==1.2.2
xgboost==2.0.3
Always make sure you are using the same versions of your ML libraries during model creation and model loading/using!
Thanks for the follow-up suggestion, I already checked the version, and everything matches. But I get the solution, it is just I must copy the dataframe before processing it into the model, I am not sure why, but it works fine.
unused_cols= ['vehicle_id', 'vehicle_title', 'vehicle_variant', 'vehicle_link', 'vehicle_type']
used_car_for_model = used_car.drop(unused_cols, axis=1).copy()
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.