Deploying models on batch transformers
Some use cases don't require a real-time endpoint. For example, you may want to predict 10 gigabytes (GB) of data once a week in one go, get the results, and feed them to a downstream application. Batch transformers are a very simple way to get this done.
In this example, we will use the scikit-learn script that we trained on the Boston Housing dataset in Chapter 7, Extending Machine Learning Services with Built-in Frameworks. Let's get started, as follows:
- Configure the estimator as usual, by running the following code:
from sagemaker.sklearn import SKLearn sk = SKLearn(entry_point='sklearn-boston-housing.py', role=sagemaker.get_execution_role(), instance_count=1, instance_type='ml.m5.large', output_path=output, hyperparameters= {'normalize': True, 'test-size': 0.1}) sk.fit({'training...