---
title: Download Scoring Code from a deployment
description: Download a Scoring Code JAR file directly from a DataRobot deployment.

---

# Download Scoring Code from a deployment {: #download-scoring-code-from-a-deployment }

!!! info "Availability information"
     The behavior of deployments from which you download Scoring Code depends on the [MLOps configuration](pricing) for your organization.

You can download [Scoring Code](sc-overview) for models as pre-compiled JAR files (with all dependencies included) to be used outside of the DataRobot platform. This topic describes how to download Scoring Code from a deployment. Alternatively, you can download it from the [Leaderboard](sc-download-leaderboard).

## Deployment download {: #deployment-download }

For Scoring Code-enabled models deployed to an [external prediction server](pred-env#add-an-external-prediction-environment), you can download Scoring Code from a deployment's [Actions menu](actions-menu) in the **Deployments** inventory or from a deployment's **Predictions > Portable Predictions** tab. For Scoring Code-enabled models deployed to a DataRobot prediction environment, you can only download Scoring Code from the **Deployments** inventory.

1. Navigate to the **Deployments** inventory, and then take either of the following steps:

    * Open a deployment, then navigate to the **Predictions > Portable Predictions** tab and click **Scoring Code**.
        ![](images/sc-download-1.png)

        !!! note
            The **Portable Predictions** tab is only available for models deployed to an external environment. If you deployed your model to a DataRobot environment, use the **Deployments** inventory Scoring Code download method.

    * Open the deployment's **Actions** menu and click **Get Scoring Code**.
        ![](images/integrations-10.png)

        The **Download Scoring Code** dialog opens.

2. Complete the fields described below in the **Portable Predictions** tab (or the **Download Scoring Code** dialog).

    ![](images/integrations-9.png)

    | | Element | Description |
    |-|---------|-------------|
    | ![](images/icon-1.png) | Scoring Code | Provides a Java package containing your DataRobot model. Under **Portable Prediction Method**, select **Scoring Code**. You can alternatively select **[Portable Prediction Server](portable-pps)** to set up a REST API-based prediction server.  |
    | ![](images/icon-2.png) | Coding language | Select the location from which you want to call the Scoring Code: [Python API](https://pypi.org/project/datarobot-predict/){ target=_blank }, [Java API](quickstart-api#java-api-example), or the [command line interface (CLI)](scoring-cli). Selecting a location updates the example snippet displayed below to the corresponding language. |
    | ![](images/icon-3.png) | Include Monitoring Agent | Downloads the [MLOps Agent](mlops-agent/index) with your Scoring Code. |
    | ![](images/icon-4.png) | Include Prediction Explanations | Includes code to calculate [Prediction Explanations](pred-explain/index) with your Scoring Code. This allows you to get Prediction Explanations from your Scoring Code by adding the command line option: `--with-explanations`. See [Scoring at the command line](scoring-cli) for more information. |
    | ![](images/icon-5.png) | Include Prediction Intervals (for time series) | Includes code to calculate [Prediction Intervals](ts-predictions#prediction-preview) with your Scoring Code. This allows you to get Prediction Intervals (from 1 to 99) from your Scoring Code by adding the command line option: `--interval_length=<integer value from 1 to 99>`. See [Scoring at the command line](scoring-cli) for more information.|
    | ![](images/icon-6.png) | Prepare and download / Prepare and download as source code | <ul><li>**Prepare and download**: Downloads the Scoring Code as a Java package. The package contains compiled Java executables, which include all dependencies and can be used to make predictions.</li><li>**Prepare and download as source code**: Downloads 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. This option is only available if you don't have the monitoring agent and prediction explanations enabled.</li></ul> |
    | ![](images/icon-7.png) | Example | Provides a code example that calls the Scoring Code using the selected coding language. |
    | ![](images/icon-8.png) | Copy to clipboard | Copies the Scoring Code example to your clipboard so that you can paste it in your IDE or on the command line.  |

    !!! tip
        Access the [DataRobot Prediction Library](https://pypi.org/project/datarobot-predict/){ target=_blank } to make predictions using various prediction methods supported by DataRobot via a Python API. The library provides a common interface for making predictions, making it easy to swap out any underlying implementation. Note that the library requires a Scoring Code JAR file.

3. Once the settings are configured, click **Prepare and download** to download a Java package or **Prepare and download as source code** to download source code files.

    !!! warning
        For users not on the 5.0 [pricing plan](pricing) who choose to download Scoring Code, the deployment becomes permanent and cannot be deleted. A warning message prompts you to accept this condition. Use the toggle to indicate your understanding, then click **Prepare and download** to download a Java package or **Prepare and download as source code** to download source code files.

4. When the Scoring Code download completes, use the snippet provided on the tab to call the Scoring Code.

    For implementation examples, reference the MLOps agent tarball documentation, which you can download from the [**Developer Tools**](api-key-mgmt#mlops-agent-tarball) page. You can also use the [monitoring snippet](code-py#monitoring-snippet) to integrate with the MLOps Agent.