I was invoking the SageMaker endpoint from my angular front-end when I came across this error on AWS CloudWatch regarding my model making inferences from the data (In the form of a comma-separated string with target values at the first index) I was sending : Unable to parse numeric values. The string I'm using to invoke the endpoint was : "1533071820,0.05619,0.05619,0.05611,0.05611,0.006076\n"
String request = "1533071820,0.05619,0.05619,0.05611,0.05611,0.006076\n"
ByteBufferbuf = ByteBuffer.wrap(request.getBytes());
invokeEndpointRequest.setBody(buf);
Use the SageMaker API
AmazonSageMakerRuntime amazonSageMaker = AmazonSageMakerRuntimeClientBuilder.defaultClient();
Invoke the model endpoint on SageMaker
InvokeEndpointResult invokeEndpointResult = amazonSageMaker.invokeEndpoint(invokeEndpointRequest);
The result I was expecting from the endpoint is a JSON object with the 'score' attribute in the format : {"predictions": [{"score": xxxxxxx}]}
I am getting a 'ModelError: Unable to evaluate payload' from the IDE logs and 'Unable to parse numeric values on CloudWatch'