November 2018
Intermediate to advanced
556 pages
14h 42m
English
During the training process, SageMaker will call the image with the following syntax:
$ docker run <image> train
This syntax is the same as we used during the local test. We can now run our estimator from the SageMaker Notebook. We need to allocate the size of machine, which is ml.m5.xlarge, pass the data, and fit the model:
import sagemaker as sagefrom time import gmtime, strftime# get sage maker accountrole = sage.get_execution_role()print(role)# get sage maker sessionsess = sage.Session()account = sess.boto_session.client('sts').get_caller_identity()['Account']region = sess.boto_session.region_namebucket_name = 'iiot-book-data'image = '{}.dkr.ecr.{}.amazonaws.com/rul-estimator:latest'.format(account, ...