Deploying Model in DataRobot. Overview

January 29, 2021
by
· 6 min read

This post was originally part of the DataRobot Community. Visit now to browse discussions and ask questions about DataRobot, AI Platform, data science, and more.

In order to realize the true value of DataRobot, you need to generate predictions against your models; this is a process commonly referred to as ‘Model Deployment.’ The DataRobot platform offers a wide variety of different deployment methods, each of which is suitable to different use cases. Let’s review the various ways to deploy DataRobot models, starting at the model Leaderboard and addressing different use case needs.

From the model Leaderboard, choose a model to get predictions from. While we’re using the one labeled “Most Accurate” here, you can choose a more suitable alternative.

Below the model detail is a set of tabs that provide many ways to further investigate a model, including the Predict tab, which I clicked on to show all the potential options for model deployment:

  • Make Predictions (aka drag-and-drop)
  • Deploy
  • Deploy to Hadoop
  • DataRobot Prime
  • Download
  • Prediction Application

Figure 1. Ways to get predictions from DataRobot

Figure 1. Ways to get predictions from DataRobot

As mentioned above, each of the different options are particularly useful in specific ways and so let’s run through them each individually.

Make Predictions

Most people see this option during their initial demo of DataRobot, or have used it to either make ad-hoc predictions or test out a model’s performance after initial fitting, as this method allows for scoring against the initial project data or via a new dataset uploaded via the UI. It is these various options which make this a very popular choice for both data scientists and analysts alike.

Example usage by user role

  • For data scientists, this is useful for model validation, ad-hoc scoring.
  • For analysts and executives, this is useful for monthly/quarterly scoring.

Deploy

For people new to machine learning, this term has the potential to be a bit misleading at first, but what it means is that you are deploying a DataRobot model via an API (Application Programming Interface). This then allows you to score data either record-by-record or via batch. This option also allows for the inclusion of DataRobot Prediction Explanations to deliver the explainability that organizations require.

This is the most common methodology if you intend to integrate model predictions into an internal system.

Example usage by user role

  • For data scientists, this is useful for live model scoring.
  • For analysts and executives, this is typically transparent via existing business systems, and custom applications for Customer Support/Call Centers.

Deploy to Hadoop

We are now in the territory of bigger Enterprise deployments, and this option allows our users to integrate DataRobot right into their existing data lakes and provide huge performance increases across vast amounts of data.

If you have DataRobot installed on a Hadoop edge node, the first thing you’ll notice here is that all of the configuration parameters in the image below will be populated with values from your cluster.

Figure 2. Configuration setting for scoring in place on a Hadoop ClusterFigure 2. Configuration setting for scoring in place on a Hadoop Cluster

  • Model export path—This is pre-populated with information for the related model.
  • Data Input Path—This is the input file/directory, Hive Table, or TCP socket containing the data the command will use for scoring.
  • Scoring output path—This must be a directory—not a filename—where the output scores are written. This must be a new directory, without the hdfs:// prefix.

At this point, you’ll want to double-check to make sure that all the values are correct and, if they are, you can begin the scoring process; note that you’ll also want to double-check that the data you want to score is present in the specific HDFS path.

If you need to edit any of the configuration paths, notice that while you do the corresponding parameters are dynamically updated in the Full Command section underneath. Cool!

Finally, if you need any assistance in the configuration of Advanced Options, please refer to the DataRobot documentation.

Example usage by user role

  • For data scientists, this is useful for scoring data in place within a Hadoop Cluster, outside of DataRobot.
  • For analysts and executives, this is not typically used.

DataRobot Prime

DataRobot Prime optimizes prediction models for use outside of the DataRobot application, which can provide multiple benefits. Once created, you can export these models as a Python module or a Java class and run the exported script. DataRobot Prime also supports models using feature lists that contain variable type transformations.

You can build a DataRobot Prime model for most models on the Leaderboard. There are, however, some situations in which models cannot be approximated. (Note that DataRobot Prime requires a separate license.)

The following steps show to how you can create a DataRobot Prime model:

  1. Choose your target model, click Predict, then select DataRobot Prime.
  2. Click the button. This generates the Prime model which will, when generated, show up on the Leaderboard with your other models. It will be labelled with distinct Prime icon:
    IMG_03_DataRobot_Prime_logo.png
  3. Select your new Prime model, then select Predict > DataRobot Prime.
  4. Changing the rule count: DataRobot will approximate a model based on the best rule count choice, but you may wish to change the rule count. 

    You can do that by:
    –Determining, from the graph, the number of rules in your chosen selection.
    –Selecting the new rule count by clicking the associated radio button.
    –Confirming the new model request by clicking Continue. When you click Continue, DataRobot generates a new DataRobot Prime model with the new rule count and adds the model to the Leaderboard.
    –Return to step 3.
  5. Now you get to choose the language most suitable to your use case. The default is Python, or you can select Java.
  6. Click Generate and Download Code to generate Prime code that is ready for download.
  7. When that is complete, click Download Generated Code.

For assistance using your DataRobot Prime model, search the in-app documentation for DataRobot Prime examples.

Example usage by user role

  • For a data scientist, this id is useful for model scoring data outside of DataRobot.
  • For analysts and executives, this is not typically used.

Download

You can use the Download tab as part of the process for exporting models from the DataRobot Platform where they were created, for use in a location outside of DataRobot. You might want, for example, to export a model from DataRobot and then use it to score data in an ultra-low latency use case where the model is as near to the data as possible. This option provides code that is easily deployable in any environment and is not dependent on the DataRobot platform. (Note that you cannot cannot generate Prediction Explanations when using this option.)

Once again, let’s start by going back to the model Leaderboard.

DataRobot models that support the download of scoring code will display a “SCORING CODE” label on the model, such as this:

Figure 3. Model labels

Figure 3. Model labels

You have the option of downloading either the source code or a pre-compiled java executable, whichever meets your needs.

Figure 4. Download model scoring codeFigure 4. Download model scoring code

DataRobot provides comprehensive in-app documentation explaining how to use your Download model code. You can search the documentation also for help with execution.

Example usage by user role

  • For data scientists, this useful for model scoring highly secure data outside of DataRobot.
  • For analysts and executives, this is not typically used.

Prediction Application

Our final way to get predictions out of DataRobot is by deploying your model via one of the Prediction Applications. These applications cover a variety of different ways to quickly deploy a data-entry front end to a DataRobot model. You can choose from one of the applications pre-built by DataRobot or choose to deploy the default application.

You can access the applications from the top menu, Applications selection.

Figure 5. Top navigation tabsFigure 5. Top navigation tabs

And you can access the default applications directly from your model deployment menu under Predict > Prediction Applications.

Figure 6. Prediction Application tab

Figure 6. Prediction Application tab

Example usage by user role

  • For data scientists, this is useful for a quick and dirty testing UI.
  • For analysts and executives, this provides a simple UI for non-complex use cases.

More Information

Check the DataRobot Public Documentation for:

Demo
Check DataRobot in Action
Request a demo
About the author
Linda Haviland
Linda Haviland

Community Manager

Meet Linda Haviland
  • Listen to the blog
     
  • Share this post
    Subscribe to DataRobot Blog
    Newsletter Subscription
    Subscribe to our Blog