Problem in XGBoost with Hosted Infernece API

Hi,
I have posted this to the beginner’s forum and unfortunately got no reply

When I train and upload a pickled xgboost model (with default hyperparameters) and use the default settings for HF Hosted Infernece API in Gradio

iface = gr.Interface.load(…)
iface.launch()

I get this error from Gradio

DataFrame.dtypes for data must be int, float, bool or category. When categorical type is supplied, The experimental DMatrix parameterenable_categorical must be set to True. Invalid columns:x1: object, x2: object

I think the HF Hosted Infernece API , passes the values as object, where xgboost expects the float values,any idea on how to deal with this on my(client) side , would be much appreciated.

1 Like