Skip to content

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

Scoring Code overview

Availability information

Contact your DataRobot representative for information on enabling the Scoring Code feature.

Scoring Code allows you to export DataRobot-generated models as JAR files that you can use outside of the platform. DataRobot automatically runs code generation for qualifying models and indicates code availability with a SCORING CODE indicator on the Leaderboard.

You can export a model's Scoring Code from the Leaderboard or the model's deployment. The download includes a pre-compiled JAR file (with all dependencies included), as well as the source code JAR file. Once exported, you can view the model's source code to help understand each step DataRobot takes in producing your predictions.

Scoring Code JARs contain Java Scoring Code for a predictive model. The prediction calculation logic is identical to the DataRobot API—the code generation mechanism tests each model for accuracy as part of the generation process. The generated code is easily deployable in any environment and is not dependent on the DataRobot application.

How does DataRobot determine which models will have Scoring Code?

When the Scoring Code feature is enabled, DataRobot generates a Java alternative for each blueprint preprocessing step and compares its results on the validation set with the original results. If the difference between results is greater than 0.00001, DataRobot does not provide the option to download the Scoring Code. In this way DataRobot ensures that the Scoring Code JAR model always produces the same predictions as the original model. If verification fails, check the Log tab for error details.

Why use Scoring Code?

  • Flexibility: Can be used anywhere that Java code can be executed.

  • Speed: Provides low-latency scoring without the API call overhead. Java code is typically faster than scoring through the Python API.

  • Integrations: Lets you integrate models into systems that can’t necessarily communicate with the DataRobot API. The Scoring Code can be used either as a primary means of scoring for fully offline systems or as a backend for systems that are using the DataRobot API.

  • Precision: Provides a complete match of predictions generated by DataRobot and the JAR model.

  • Hardware: Allows you to to use additional hardware to score large amounts of data.

See the following sections for more details:

Note

The model JAR files require Java 8 or later.

Scoring Code or DataRobot Prime?

Both DataRobot Prime and the Scoring code JAR option provide code that is easily deployable for making offline predictions, independent of the DataRobot application. When deciding which approach best suits your needs, consider the following:

Requirement Available solutions
Java scoring code DataRobot Prime or Scoring Code
Python scoring code DataRobot Prime, Rulefit Models
C++ scoring code Scoring Code
Tunable accuracy/speed trade-off DataRobot Prime

For full details, see the reasons to use DataRobot Prime.

Download Scoring Code for legacy users

Models displaying the SCORING CODE indicator on the Leaderboard are available for Scoring Code download.

Availability information

The ability to download Scoring Code for a model from the Leaderboard depends on the MLOps configuration for your organization. Legacy users will see the option described below. MLOps users can download Scoring Code from the Leaderboard and directly from a deployment.

Navigate to the Predict > Downloads tab, where you can select a download option and access a link to the up-to-date Java API documentation.

There are two download options for Scoring Code:

Selection To download...
Binary These are compiled Java executables, which include all dependencies and can be used to make predictions.
Source (Java source code files) These are a non-obfuscated version of the model; they cannot be used to score the model since they are not compiled and dependency packages are not included. Use the source files to explore the model’s decision-making process.

Additional information about the Java API can be found in the DataRobot javadocs.


Updated May 31, 2022
Back to top