Class SageMaker


  • public final class SageMaker
    extends java.lang.Object
    A utility class that help deploy model to SageMaker.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SageMaker.Builder
      A Builder to construct a SageMaker.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SageMaker.Builder builder()
      Creates a builder to build a SageMaker instance.
      void deleteEndpoint​(boolean quietly)
      Deletes the Amazon SageMaker endpoint.
      void deleteEndpointConfig​(boolean quietly)
      Deletes the endpoint configuration.
      void deleteSageMakerModel​(boolean quietly)
      Deletes the SageMaker model configuration.
      void deploy()
      Deploys the model to Amazon SageMaker hosting service.
      byte[] invoke​(byte[] body)
      Invokes the Amazon SageMaker endpoint.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • deploy

        public void deploy()
                    throws java.io.IOException
        Deploys 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 a SageMaker instance.
        Returns:
        a new builder