Skip to content

Instantly share code, notes, and snippets.

@RoaldSchuring
Created July 13, 2019 13:59
Show Gist options
  • Save RoaldSchuring/31b37e09d84af08bb4c5bed522e4ba7c to your computer and use it in GitHub Desktop.
Save RoaldSchuring/31b37e09d84af08bb4c5bed522e4ba7c to your computer and use it in GitHub Desktop.
call_nearest_neighbors
response = runtime.invoke_endpoint(EndpointName='sagemaker-scikit-learn-2019-07-04-13-00-07-919',
ContentType='application/json',
Body=wine_vector_output)
def decode(s, encoding="ascii", errors="ignore"):
return s.decode(encoding=encoding, errors=errors)
result = json.loads(decode(response['Body'].read()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment