on-internet
← Community

Value at 'body' failed to satisfy constraint: Member must not be null

Stack Overflow ·

I'm trying to run a prediction using a sagemaker endpoint. The input format is comma separated features and | separated observations. However when I try to iterate over the input data and invoke the end point on every iteration like this : ENDPOINT_NAME = "my_endpoint" runtime= boto3.client('runtime.sagemaker') results = [] for r in request_body.split('|'): response = runtime.invoke_endpoint(EndpointName=ENDPOINT_NAME, ContentType='text/csv', Body=r) result = json.loads(response['Body'].read().decode()) results.append(result) I get the following error: ValidationError: an error occurred (Valid

Comments

Sign in or sign up to comment and upvote.

No comments yet.