use of software.amazon.awssdk.services.sagemaker.SageMakerClient in project aws-doc-sdk-examples by awsdocs.
the class ListAlgorithms method main.
public static void main(String[] args) {
Region region = Region.US_WEST_2;
SageMakerClient sageMakerClient = SageMakerClient.builder().region(region).build();
listAlgs(sageMakerClient);
sageMakerClient.close();
}
use of software.amazon.awssdk.services.sagemaker.SageMakerClient in project aws-doc-sdk-examples by awsdocs.
the class CreateTransformJob method main.
public static void main(String[] args) {
final String usage = "\n" + "Usage:\n" + " <s3Uri> <s3OutputPath> <modelName> <transformJobName>\n\n" + "Where:\n" + " s3Uri - identifies the key name of an Amazon S3 object that contains the data (ie, s3://mybucket/churn.txt).\n\n" + " s3OutputPath - the Amazon S3 location where the results are stored.\n\n" + " modelName - the name of the model.\n\n" + " transformJobName - the name of the transform job.\n\n";
if (args.length != 4) {
System.out.println(usage);
System.exit(1);
}
String s3Uri = args[0];
String s3OutputPath = args[1];
String modelName = args[2];
String transformJobName = args[3];
Region region = Region.US_WEST_2;
SageMakerClient sageMakerClient = SageMakerClient.builder().region(region).build();
transformJob(sageMakerClient, s3Uri, s3OutputPath, modelName, transformJobName);
sageMakerClient.close();
}
use of software.amazon.awssdk.services.sagemaker.SageMakerClient in project aws-doc-sdk-examples by awsdocs.
the class ListNotebooks method main.
public static void main(String[] args) {
Region region = Region.US_WEST_2;
SageMakerClient sageMakerClient = SageMakerClient.builder().region(region).build();
listBooks(sageMakerClient);
sageMakerClient.close();
}
use of software.amazon.awssdk.services.sagemaker.SageMakerClient in project aws-doc-sdk-examples by awsdocs.
the class CreateModel method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <dataUrl> <image> <modelName> <executionRoleArn>\n\n" + "Where:\n" + " dataUrl - the Amazon S3 path where the model artifacts, which result from model training, are stored.\n\n" + " image - the Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored (for example, xxxxx5047983.dkr.ecr.us-west-2.amazonaws.com/train).\n\n" + " modelName - the name of the model.\n\n" + " executionRoleArn - the Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can assume to access model artifacts (for example, arn:aws:iam::xxxxx5047983:role/service-role/AmazonSageMaker-ExecutionRole-20200627T12xxxx).\n\n";
if (args.length != 4) {
System.out.println(USAGE);
System.exit(1);
}
String dataUrl = args[0];
String image = args[1];
String modelName = args[2];
String executionRoleArn = args[3];
Region region = Region.US_WEST_2;
SageMakerClient sageMakerClient = SageMakerClient.builder().region(region).build();
createSagemakerModel(sageMakerClient, dataUrl, image, modelName, executionRoleArn);
sageMakerClient.close();
}
use of software.amazon.awssdk.services.sagemaker.SageMakerClient in project aws-doc-sdk-examples by awsdocs.
the class CreateTrainingJob method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <s3UriData> <s3Uri> <trainingJobName> <roleArn> <s3OutputPath> <channelName> <trainingImage>\n\n" + "Where:\n" + " s3UriData - the location of the training data (for example, s3://trainbucket/train.csv).\n\n" + " s3Uri - the Amazon S3 path where you want Amazon SageMaker to store checkpoints (for example, s3://trainbucket).\n\n" + " trainingJobName - the name of the training job. \n\n" + " roleArn - the Amazon Resource Name (ARN) of the IAM role that SageMaker uses.\n\n" + " s3OutputPath - the output path located in an Amazon S3 bucket (for example, s3://trainbucket/sagemaker).\n\n" + " channelName - the channel name (for example, s3://trainbucket/sagemaker).\n\n" + " trainingImage - the training image (for example, 000007028032.bbb.zzz.us-west-2.amazonaws.com/xgboost:latest.\n\n";
if (args.length != 7) {
System.out.println(USAGE);
System.exit(1);
}
String s3UriData = args[0];
String s3Uri = args[1];
String trainingJobName = args[2];
String roleArn = args[3];
String s3OutputPath = args[4];
String channelName = args[5];
String trainingImage = args[6];
Region region = Region.US_WEST_2;
SageMakerClient sageMakerClient = SageMakerClient.builder().region(region).build();
trainJob(sageMakerClient, s3UriData, s3Uri, trainingJobName, roleArn, s3OutputPath, channelName, trainingImage);
sageMakerClient.close();
}
Aggregations