Skip to content

Click in-app to access the full platform documentation for your version of DataRobot.

Import to SageMaker

Using the Amazon S3 console, you can make predictions by importing DataRobot Scoring Code models to SageMaker.

Complete the following before importing Scoring Code models to SageMaker:

  • Create a TAR.GZ archive that contains your model (the Scoring Code JAR file provided by DataRobot). You can download the JAR file from the Leaderboard or from a deployment.
  • Make sure the model you want to import supports Scoring Code.

Upload Scoring Code

In order for SageMaker to access your Scoring Code JAR file, you must upload the TAR.GZ archive to an AWS S3 bucket.

  1. Enter the Amazon S3 console.

  2. Click Upload and provide your TAR.GZ archive to the S3 bucket.

Publish Docker image to Amazon ECR

Publish a Docker image containing inference code to the Amazon ECR (detailed in the AWS documentation). You can download a DataRobot Docker image with the following command:

docker pull datarobot/scoring-inference-code-sagemaker:latest

Create the model

Now, you can create a model in the SageMaker console.

  1. Sign in to AWS and enter "SageMaker" into the search bar. Select the first result (Amazon Sagemaker) to enter the SageMaker console and create a model.

  2. In the IAM role field, select Create a new role from the dropdown if you do not have an existing role on your account. This option creates a role with the required permissions and assigns it to your instance.

  3. Complete the fields for the Container definition:

    • For the Container input options field (1), select Provide model artifacts and inference image location.

    • Specify the registry path to the Docker image containing the inference code (2).

    • Specify the location of the Scoring Code image (your model) in the S3 bucket (3).

    Click Add container below the fields when complete.

Create an endpoint configuration

To make predictions, set up an endpoint configuration.

  1. Open the dashboard on the left side and navigate to the Endpoint configurations page to create a new endpoint configuration. Select the model you have uploaded.

    • Name the endpoint configuration (1).

    • (Optional) Provide an encryption key (2).

    When complete, select Create endpoint configuration at the bottom of the page.

  2. Use the dashboard to navigate to Endpoints and create a new endpoint:

    • Name the endpoint (1).

    • Opt to use an existing endpoint configuration (2).

    • Select the configuration you just created (3).

    When complete, click Select endpoint configuration. When the endpoint creation completes, you can make prediction requests with your model.

Updated July 25, 2022
Back to top