Package ai.djl.aws.sagemaker
Class SageMaker
- java.lang.Object
-
- ai.djl.aws.sagemaker.SageMaker
-
public final class SageMaker extends java.lang.ObjectA utility class that help deploy model to SageMaker.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSageMaker.BuilderA Builder to construct aSageMaker.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SageMaker.Builderbuilder()Creates a builder to build aSageMakerinstance.voiddeleteEndpoint(boolean quietly)Deletes the Amazon SageMaker endpoint.voiddeleteEndpointConfig(boolean quietly)Deletes the endpoint configuration.voiddeleteSageMakerModel(boolean quietly)Deletes the SageMaker model configuration.voiddeploy()Deploys the model to Amazon SageMaker hosting service.byte[]invoke(byte[] body)Invokes the Amazon SageMaker endpoint.
-
-
-
Method Detail
-
deploy
public void deploy() throws java.io.IOExceptionDeploys the model to Amazon SageMaker hosting service.- Throws:
java.io.IOException- if failed upload model to S3
-
deleteEndpoint
public void deleteEndpoint(boolean quietly)
Deletes the Amazon SageMaker endpoint.- Parameters:
quietly- true to suppress error
-
deleteEndpointConfig
public void deleteEndpointConfig(boolean quietly)
Deletes the endpoint configuration.- Parameters:
quietly- true to suppress error
-
deleteSageMakerModel
public void deleteSageMakerModel(boolean quietly)
Deletes the SageMaker model configuration.- Parameters:
quietly- true to suppress error
-
invoke
public byte[] invoke(byte[] body)
Invokes the Amazon SageMaker endpoint.- Parameters:
body- the request payload- Returns:
- the inference response
-
builder
public static SageMaker.Builder builder()
Creates a builder to build aSageMakerinstance.- Returns:
- a new builder
-
-