Hello,
I have an ML model that was saved as a pickle in the local computer “model.pkl”
However, when I try to apply this model on new data, it gives me the error:
XGBoostError: [13:38:10] C:\Users\Administrator\workspace\xgboost-win64_release_1.1.0\include\xgboost/json.h:65: Invalid cast, from Null to Array
I tried also by putting everything on github, my code and the model. I load my model like this:
model_from_joblib = joblib.load(‘default_class_model.pkl’)
Where ‘default_class_model.pkl’ is also inside my Github repository. I get the same error. Is this having to do with how I am loading ‘default_class_model.json’? how should I load it otherwise?
Thanks
I can only guess…
Probably you are using too old xgboost version (1.1.0) , since support for JSON was introduced in xgboost version 1.3
Can you share your github repo link?
I checked and I trained my model is in the latest xgboost version. I also made sure to deploy the app on the latest python version 3.9 (although my model is trained on 3.10 )
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.