Skip to content

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

Prepare a model

Before adding custom models and environments to DataRobot, you must prepare and structure the files required to run them successfully. The tools and templates necessary to prepare custom models are hosted in the Custom Model GitHub repository. (Log in to GitHub before clicking this link.) DataRobot recommends the following workflows to prepare your contents for upload to the Custom Model Workshop:

Unstructured custom inference models

DataRobot supports custom models that do not use the conventional regression or binary classification target types. When you create a custom model, you can select unstructured for additional target types. Unstructured models do not need to conform to a specific input/output schema like regression and binary classification models do. They may use any arbitrary data for their inputs and outputs. This allows you to deploy and monitor any type of model with DataRobot, regardless of the target type.

Unstructured models give you more control over how you read the data from a prediction request and response. However, they require precise coding to assemble; you must implement custom model hooks to process unstructured input data and generate a response.

Note

Note that unstructured models have limited deployment capabilities. Data drift and accuracy statistics, challenger models, and humility rules are disabled for deployed unstructured models. Additionally, you cannot add training data to deployed unstructured custom models.

For assembly instructions specific to unstructured custom inference models, reference the model templates for Python and R provided in the DRUM documentation.

Assemble a folder

To create a custom inference model, you must provide specific files to use with a custom environment:

  • a serialized model artifact with a file extension corresponding to the chosen environment language.
  • any additional custom code required to use it.

Reference the custom model GitHub repository for specific guidelines to properly assemble your folder:

  • Structure the model artifact to match the library your model is based on
  • Provide the appropriate custom hooks for Python, R, and Java models.
  • Reference the custom model templates to ensure your assembled custom model folder has the correct contents.

Note

Log in to GitHub before accessing these GitHub resources.

Prepare an environment

When creating a custom model, the custom environment used must be compatible with the model contents, as it defines the model's runtime environment. Reference the custom model GitHub repository for specific guidelines to properly prepare your custom environment:

  • Use or modify the custom environment templates that are compatible with your custom models.
  • Reference the guidelines for building your own environment. DataRobot recommends using an environment template and not building your own environment except for specific use cases (for example, if you don't want to use DRUM but you want to implement your own prediction server.)

Local testing

When you have assembled your custom model folder, use DRUM, a custom model runner tool, to test the model locally. You can test a custom inference model with its environment in the Custom Model Workshop to ensure that it works as expected before deploying it.

You can download DRUM from PyPi.

Reference the DRUM GitHub repository for specific usage guidelines:


Updated November 5, 2021
Back to top