# Deployment actions
URL: https://docs.datarobot.com/en/docs/workbench/nxt-console/nxt-overview/nxt-deployment-actions.html

> Manage deployments using the actions menu, which allows you to apply deployment settings, share deployments, create applications using the deployed model, replace models, and delete deployments, among other actions.

# Deployment actions

On the Deployments page, you can manage deployments using the actions menu. The available options depend on a variety of criteria, including user permissions and the data available for your deployment. The table below briefly describes each option. Access the actions menu to the right of each deployment on the [Deploymentsdashboard](https://docs.datarobot.com/en/docs/workbench/nxt-console/nxt-overview/nxt-dashboard.html) or in the upper-right corner of the [Overview](https://docs.datarobot.com/en/docs/workbench/nxt-console/nxt-overview/nxt-overview.html) tab:

**Dashboard:**
Click the menu icon to open the actions menu:

[https://docs.datarobot.com/en/docs/images/nxt-dashboard-deploy-actions.png](https://docs.datarobot.com/en/docs/images/nxt-dashboard-deploy-actions.png)

Or, click the row in the table to open the deployment [Overview](https://docs.datarobot.com/en/docs/workbench/nxt-console/nxt-overview/nxt-overview.html), where you can view deployment information and access the actions menu.

**Overview:**
Click Actions to open the actions menu:

[https://docs.datarobot.com/en/docs/images/nxt-overview-deploy-actions.png](https://docs.datarobot.com/en/docs/images/nxt-overview-deploy-actions.png)


| Option | Availability | Description |
| --- | --- | --- |
| Deployment access | User, Owner | Opens the selected deployment to the Overview tab. From there, access deployment information, settings, and monitoring. If you have Consumer access to a deployment, you can't view, access, or act on that deployment. |
| Replace model | Owner | Replaces the current model in the deployment with a newly specified registered model version. Prediction accuracy tends to degrade over time (which you can track in the Data drift dashboard) as conditions and data change. If you have the appropriate permissions, you can easily switch over to a new, better-adapted model using the model replacement action. You can then incorporate the new model predictions into downstream applications. This action initiates an email notification. |
| Create application | Owner | Launches a DataRobot application using the deployed model. |
| Get scoring code | User, Consumer, Owner | Downloads Scoring Code (in JAR format) directly from the deployment. This action is only available for models that support Scoring Code. See more information on Scoring Code download settings. |
| Link to Use Cases | User, Owner | Links the deployment to a new or existing Use Case; or, manages the exiting Use Case connections. |
| Share | User, Owner | Provides sharing capabilities independent of project permissions. The sharing capability allows appropriate user roles to grant permissions on a deployment, independent of the project that created the deployed model. This is useful, for example, when the model creator regularly refreshes the model and wants those it was shared with to have access to the updated predictions but not to the model itself. To share a deployment, enter the email address of the person you would like to share the deployment with, select their role, and click Share. You can later change the user's permissions by clicking on the current permission and selecting a new access level from the dropdown. This action initiates an email notification. Additionally, deployment Owners and Users can share with groups and organizations. Select either the Groups or Organizations tab in the sharing modal. |
| View logs | User, Owner | For custom model deployments, opens the custom model runtime and startup logs for troubleshooting. For more information, see the Standard output documentation. |
| Clear statistics | Owner | Resets the logged statistics for a deployment. Deployments collect various statistics for a model. In some cases, you may configure and test a deployed model before pushing a production workload on it to see if, for example, predictions perform well on data similar to that which you would upload for production. After testing a deployment, DataRobot allows you to reset the logged analytics so that you can separate testing data from live data without needing to recreate a fresh deployment. Complete the fields in the dialog box to configure the model to clear statistics from, the date range to clear, and the reason for clearance, then confirm. |
| Relaunch | Owner | For management agent deployments, relaunches the deployment in the prediction environment managed by the agent. |
| Activate / Deactivate | Owner | Enables or disables a deployment's monitoring and prediction request capabilities. If you have the appropriate permissions can activate its prediction requests and some monitoring capabilities. Deployments have capabilities that consume a large amount of resources, such as prediction requests and data monitoring. You may want to test the prediction experience for a model or experiment with monitoring output settings without expending any resources or risking a production outage. Deployment activation allows you to control when these resource-intensive capabilities are enabled for individual deployments. Additionally, note that inactive deployments do not count towards your deployment limit. |
| Delete | Owner | Removes a deployment from the inventory. If you have the appropriate permissions, you can delete a deployment from the inventory. This action initiates an email notification to all users with sharing privileges to the deployment. |

## Link to a Use Case

To link a deployment to a Workbench [Use Case](https://docs.datarobot.com/en/docs/workbench/nxt-workbench/usecases/usecase-overview.html), in the deployment's actions menu, click Link to Use Cases.

In the Link to Use Case modal, select one of the following options:

**Select Use Case:**
[https://docs.datarobot.com/en/docs/images/wb-select-use-case.png](https://docs.datarobot.com/en/docs/images/wb-select-use-case.png)

**Create Use Case:**
[https://docs.datarobot.com/en/docs/images/wb-create-use-case.png](https://docs.datarobot.com/en/docs/images/wb-create-use-case.png)

**Managed linked Use Cases:**
[https://docs.datarobot.com/en/docs/images/wb-manage-use-case.png](https://docs.datarobot.com/en/docs/images/wb-manage-use-case.png)


| Option | Description |
| --- | --- |
| Select Use Case | Click the Use Case name dropdown list to select an existing Use Case, then click Link to Use Case. |
| Create Use Case | Enter a new Use Case name and an optional Description, then click Create Use Case to create a new Use Case in Workbench. |
| Managed linked Use Cases | Click the minus icon next to a Use Case to unlink it from the asset, then click Unlink selected. |

## Replace deployed models

Because model predictions tend to degrade in accuracy over time, DataRobot provides an easy way to replace the deployed registered model version with a newer, or more effective, version. This ensures that models are up-to-date and accurate. Using the model management capability to switch the registered model version for a deployment allows model creators to keep models current without disrupting downstream consumers. It helps model validators and data science teams to track model history, and, it provides model consumers with confidence in their predictions without needing to know the details of the changeover.

To replace the registered model version for a deployment:

1. From theDeploymentsdashboard or theOverviewtab, open the actions menu:
2. ClickReplace model.
3. On theReplace registered model versionpanel, select aReplacement reason:
4. If there's adeployment approval policyconfigured for the deployment, select when toApply replacement:
5. Click a registered model version, then clickSelect:
6. The model validation process runs to test the new model’s compatibility with the deployment. During this process, don’t close or refresh this page or exit the application. After the validation process completes:

### Model replacement considerations

When replacing a deployed model, note the following:

- Model replacement is available for all deployments. Each deployment's model is provided as a model package, which can be replaced with another model package, provided it iscompatible.
- The new model packagecannotbe the same model in the same Experiment as an existing champion or challenger; each challengermustbe a unique model. If you create multiple model packages from the same model, you can't use those models as challengers in the same deployment.
- While only the most current model is deployed, model history is maintained and can be used as a baseline for data drift.

#### Model replacement validation

DataRobot validates whether the new model is an appropriate replacement for the existing model and provides warning messages if issues are found. DataRobot compares the models to ensure that:

- The target names and types match. For classification targets, the class names must match.
- The feature types match.
- There are no new features. If the new model has more features, the warning identifies the additional features. This is intended to help prevent prediction errors if the new model requires features not available in the old model.
- The replacement model supports all humility rules.
- If the existing model is a time series model, the replacement model must also be a time series model and the series types must match (single series/multiseries).
- If the model is a custom inference model, it must pass custom model tests.
- Prediction intervals must be compatible if enabled for the deployment.
- Segments must be compatible if segment analysis is enabled for the deployment.

> [!NOTE] Input feature validation
> DataRobot is only able to validate model input features if you have assigned training data to both model packages (the existing model package for your deployment, and the one you selected to replace it with). Otherwise, DataRobot is unable to validate that the two model packages have the same target type and target name. A warning message informs you that model replacement is not allowed if the model, target type, and target name are not the same.

#### Model replacement compatibility

Consider the compatibility of each model package type (external and DataRobot) before proceeding with model package replacement for a deployment:

**SaaS:**
External model packages
(monitored by the
MLOps agent
) can only replace other external model packages. They cannot be replaced by DataRobot model packages.
Custom model packages
are DataRobot model packages. DataRobot model packages can only replace other DataRobot model packages. They cannot be replaced by external model packages.

**Self-Managed:**
External model packages
(monitored by the
MLOps agent
) can only replace other external model packages. They cannot be replaced by DataRobot model packages.
Custom model packages
and
imported .mlpkg files
are both DataRobot model package types. DataRobot model packages can only replace other DataRobot model packages. They cannot be replaced by external model packages.

---
