amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

Model error when invoking Endpoint: "Unable to evaluate payload provided:.."

Open ezequielpaura opened this issue 7 years ago • 4 comments

Hello,

We are experiencing an issue when invoking the endpoint of an XGBoost model. This is the error we get when we try to validate the Endpoint:

ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from model with message "Unable to evaluate payload provided: [07:45:30] /workspace/src/learner.cc:723: Check failed: mparam_.num_feature != 0 (0 vs. 0) : 0 feature is supplied.  Are you using raw Booster interface?
Stack trace:
  [bt] (0) /usr/local/lib/python3.5/dist-packages/xgboost/./lib/libxgboost.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x24) [0x7fc131392cb4]
  [bt] (1) /usr/local/lib/python3.5/dist-packages/xgboost/./lib/libxgboost.so(xgboost::LearnerImpl::LazyInitModel()+0x5bf) [0x7fc1314281ef]
  [bt] (2) /usr/local/lib/python3.5/dist-packages/xgboost/./lib/libxgboost.so(xgboost::Booster::LazyInit()+0x22) [0x7fc13139caf2]
  [bt] (3) /usr/local/lib/python3.5/dist-packages/xgboost/./lib/libxgboost.so(XGBoosterPredict+0x53) [0x7fc13138ebc3]
  [bt] (4) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c) [0x7fc15083ae20]
  [bt] (5) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call+0x2eb) [0x7fc15083a88b]
  [bt] (6) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(_ctypes_callproc+0x49a) [0x7fc15083501a]
  [bt] (7) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(+0x9fcb) [0x7fc150828fcb]
  [bt] (8) /usr/bin/python3(PyObject_Call+0x47) [0x5c20e7]

". See https://eu-west-1.console.aws.amazon.com/cloudwatch/home?region=eu-west-1#logEventViewer:group=/aws/sagemaker/Endpoints/XGBoostEndpoint-CU01 in account 413242204882 for more information.

Before specifying the repo version in the get_image_uri, the same operation used to work perfectly. We are now using repo_version='0.90-1' and this error appeared.

Is there something we can do to make it work again? I commented on this issue here too: https://github.com/awslabs/amazon-sagemaker-examples/issues/235

ezequielpaura avatar Sep 09 '19 07:09 ezequielpaura

Hi Ezequiel, were you able to find a resolution?

If not, what image/XGBoost version did you train the model in this endpoint with? If you were not specifying the repo_version in the past, you were using the old XGBoost 0.72 image, which may be the cause of this issue. Can you retrain your model with the 0.90-1 image, then redeploy the endpoint and see if the problem persists?

aws-patlin avatar Dec 19 '19 18:12 aws-patlin

Hi Patrick, I was able to find a solution. The cause was exactly what you mentioned, I was using the default (old) version and the model needed to be retrained. Thanks!

ezequielpaura avatar Jan 07 '20 14:01 ezequielpaura

Great! Glad I could help. Can this issue be closed?

aws-patlin avatar Jan 07 '20 17:01 aws-patlin

Yep.

ezequielpaura avatar Jan 28 '20 07:01 ezequielpaura