aws / aws/amazon-sagemaker-examples

RealTimePredictor reference in sample notebooks

Open
#1,665 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

URL : https://github.com/aws/amazon-sagemaker-examples/blob/c4491228ce9f8eebcb3d411fd623d9dfd24f30b7/sagemaker-python-sdk/scikit_learn_inference_pipeline/Inference%20Pipeline%20with%20Scikit-learn%20and%20Linear%20Learner.ipynb

Below code snippet is throwing deprecation exception and unable to load container_type
from sagemaker.predictor import json_serializer, csv_serializer, json_deserializer, RealTimePredictor
from sagemaker.content_types import CONTENT_TYPE_CSV, CONTENT_TYPE_JSON
payload = 'M, 0.44, 0.365, 0.125, 0.516, 0.2155, 0.114, 0.155'
actual_rings = 10
predictor = RealTimePredictor(
endpoint=endpoint_name,
sagemaker_session=sagemaker_session,
serializer=csv_serializer,
content_type=CONTENT_TYPE_CSV,
accept=CONTENT_TYPE_JSON)

print(predictor.predict(payload))

https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker_model_monitor/enable_model_monitor/SageMaker-Enable-Model-Monitor.ipynb

https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker_model_monitor/enable_model_monitor/SageMaker-Enable-Model-Monitor.ipynb

Contributor guide

Open the contributing guide

Research direction

Start with the linked “Inference Pipeline with Scikit-learn and Linear Learner” notebook and inspect its RealTimePredictor import and construction. Check the SageMaker Python SDK’s current predictor API and the referenced model-monitor notebook for related usage. Done means the sample notebook no longer raises the deprecation exception and its prediction call runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.