November 2018
Intermediate to advanced
556 pages
14h 42m
English
We are now able to deploy the final endpoint. From Jupyter Notebook, we can deploy the model with the following command:
predictor = model.deploy(initial_instance_count=1,instance_type='ml.m4.xlarge', endpoint_name='iiot-book-rul-predictor')
We can test the model by passing the CSV test file as an input:
import sagemakerfrom sagemaker.predictor import csv_serializer, json_deserializer#Use the following line to get a preditor by attaching to an existing endpoint#linear_predictor = sagemaker.predictor.RealTimePredictor('<endpoint name>')predictor.content_type = 'text/csv'predictor.serializer = csv_serializerresult = predictor.predict(dataset_test.values).decode('utf-8')print(result)
The output will ...