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()Deletes the Amazon SageMaker endpoint.voiddeleteEndpointConfig()Deletes the endpoint configuration.voiddeleteSageMakerModel()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()
Deletes the Amazon SageMaker endpoint.
-
deleteEndpointConfig
public void deleteEndpointConfig()
Deletes the endpoint configuration.
-
deleteSageMakerModel
public void deleteSageMakerModel()
Deletes the SageMaker model configuration.
-
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
-
-