Problem
After loading your model using the Pyfunc interface in a notebook and passing it in as a Pandas DataFrame, you then try to send a JSON input data request to the model’s endpoint. In response you receive an error message.
{"error_code": "BAD_REQUEST", "message": "Encountered an unexpected error while evaluating the model. Verify that the input is compatible with the model for inference. Error ''<' not supported between instances of 'NoneType' and 'NoneType'"}.
The issue occurs when the model is a feature_store flavor with a scikit-learn sub-flavor.
Cause
There is a discrepancy between the endpoint and the loaded model in a notebook to get predictions, where the feature column is NULL
for all rows. This causes the entire column to be None
.
Solution
Pass one more input parameter from the list of input columns in the endpoint’s model signature. This adjustment allows the endpoint to process the input correctly.