public static final class SageMaker.Builder
extends java.lang.Object
SageMaker.| Modifier and Type | Method and Description |
|---|---|
SageMaker |
build()
Builds the
SageMaker with the provided data. |
SageMaker.Builder |
optBucketName(java.lang.String bucketName)
Sets the optional S3 bucket name to store the model.
|
SageMaker.Builder |
optBucketPath(java.lang.String bucketPath)
Sets the optional s3 path prefix where the model to be stored.
|
SageMaker.Builder |
optContainerImage(java.lang.String containerImage)
Sets the optional ECR image to deploy on SageMaker endpoint.
|
SageMaker.Builder |
optEndpointConfigName(java.lang.String endpointConfigName)
Sets the optional endpoint configuration name to create.
|
SageMaker.Builder |
optEndpointName(java.lang.String endpointName)
Sets the optional endpoint name to create.
|
SageMaker.Builder |
optExecutionRole(java.lang.String executionRole)
Sets the optional role to execute the SageMaker endpoint.
|
SageMaker.Builder |
optIamClient(software.amazon.awssdk.services.iam.IamClient iamClient)
Sets the
IamClient. |
SageMaker.Builder |
optInstanceCount(int instanceCount)
Sets the number of instance to launch, default is 1.
|
SageMaker.Builder |
optInstanceType(java.lang.String instanceType)
Sets the optional instance type to launch the endpoint.
|
SageMaker.Builder |
optModelName(java.lang.String modelName)
Sets the optional model name to create.
|
SageMaker.Builder |
optS3Client(software.amazon.awssdk.services.s3.S3Client s3Client)
Sets the
S3Client. |
SageMaker.Builder |
optSageMakerClient(software.amazon.awssdk.services.sagemaker.SageMakerClient sageMakerClient)
Sets the
SageMakerClient. |
SageMaker.Builder |
optSageMakerRuntimeClient(software.amazon.awssdk.services.sagemakerruntime.SageMakerRuntimeClient sageMakerRuntimeClient)
Sets the
SageMakerRuntimeClient. |
SageMaker.Builder |
setModel(ai.djl.Model model)
Sets the model to be deployed on Amazon SageMaker.
|
public SageMaker.Builder setModel(ai.djl.Model model)
model - the model to be deployed on Amazon SageMakerpublic SageMaker.Builder optBucketName(java.lang.String bucketName)
If S3 bucket name is not provided, a random bucket with "djl-sm-" prefix will be created
bucketName - the S3 bucket name to store the modelpublic SageMaker.Builder optBucketPath(java.lang.String bucketPath)
bucketPath - the s3 path prefixpublic SageMaker.Builder optExecutionRole(java.lang.String executionRole)
If executionRole is not set, current aws role will be used. If no current role
found, a runtime exception will thrown.
executionRole - the role to execute the SageMaker endpointpublic SageMaker.Builder optContainerImage(java.lang.String containerImage)
If containerImage is not set, current container image will be used. If the
code is not executed in an container, a runtime exception will thrown.
containerImage - ECR image to deploy on SageMaker endpointpublic SageMaker.Builder optEndpointConfigName(java.lang.String endpointConfigName)
If endpointConfigName is not set, model name will be used as configuration
name.
endpointConfigName - the endpoint configuration name to createpublic SageMaker.Builder optEndpointName(java.lang.String endpointName)
If endpointName is not set, model name will be used as endpoint name.
endpointName - the endpoint name to createpublic SageMaker.Builder optModelName(java.lang.String modelName)
If modelName is not set, model name will be used as model name.
modelName - the model name to createpublic SageMaker.Builder optInstanceType(java.lang.String instanceType)
If instanceType is not set, "ml.m4.xlarge" will be used.
instanceType - the instance type to launch the endpointpublic SageMaker.Builder optInstanceCount(int instanceCount)
instanceCount - the number of instance to launch, default is 1public SageMaker.Builder optSageMakerClient(software.amazon.awssdk.services.sagemaker.SageMakerClient sageMakerClient)
SageMakerClient.sageMakerClient - the SageMakerClientpublic SageMaker.Builder optSageMakerRuntimeClient(software.amazon.awssdk.services.sagemakerruntime.SageMakerRuntimeClient sageMakerRuntimeClient)
SageMakerRuntimeClient.sageMakerRuntimeClient - the SageMakerRuntimeClientpublic SageMaker.Builder optS3Client(software.amazon.awssdk.services.s3.S3Client s3Client)
S3Client.s3Client - the S3Clientpublic SageMaker.Builder optIamClient(software.amazon.awssdk.services.iam.IamClient iamClient)
IamClient.iamClient - the IamClient