Manage custom applications¶
The Applications page in the Registry lists all custom applications available to you from the All applications tab. The table below describes the elements and available actions from this page:
Element | Description | |
---|---|---|
1 | Application name | The application name. |
2 | Version | Lists the version number of the application or source. |
3 | Open | Click to open an application or source. |
4 | Actions menu | Shares, controls, or deletes an application. |
5 | Search | Use to find a specific application in the list. |
6 | Application tabs | Choose to view built applications or application sources. |
7 | Add dropdown | Use the Add dropdown to upload a custom app or create a new application source. |
Share applications¶
The sharing capability allows you to manage permissions and share an application with users, groups, and organizations, as well as recipients outside of DataRobot. This is useful, for example, for allowing others to use your application without requiring them to have the expertise to create one.
Warning
When multiple users have access to the same application, it's possible that each user can see, edit, and overwrite changes or predictions made by another user, as well as view their uploaded datasets. This behavior depends on the nature of the custom application.
You can access sharing functionality from the actions menu in the Apps workshop. Click the Actions menu next to the app you want to share and select Share ().
This opens the Share dialog, which lists each associated user and their role. Editors can share an application with one or more users or groups, or the entire organization. Additionally, you can share an application externally with a sharing link.
-
To add a new user, enter their username in the Share with field.
-
Choose their role from the dropdown.
-
Select Send notification to send an email notification and Add note to add additional details to the notification.
-
Click Share.
-
Select either the Groups or Organizations tab in the Share dialog.
-
Enter the group or organization name in the Share with field.
- Determine the role for permissions.
- Click Share. The app is shared with—and the role is applied to—every member of the designated group or organization.
To share a custom app with non-DataRobot users, toggle on Enable external sharing. The link that appears beneath the toggle allows you to share custom with end-users who don't have access to DataRobot. Before you can share that link with end users, you must specify the email domains and addresses that are permitted access to the app. Email invitations expire one hour after they are sent to a user. After a user accepts authentication, the authentication token created expires after 14 days. You can revoke access to a sharing link by modifying this list. Remove the domains or addresses that you no longer want to have access to the app.
The following actions are also available in the Share dialog:
- To remove a user, click the X button to the right of their role.
-
To re-assign a user's role, click the assigned role and assign a new one from the dropdown.
Delete an application¶
If you have the appropriate permissions, you can delete an application by opening the Actions menu and clicking Delete ().
Application sources¶
An application source contains the files, dependencies, and environment from which a custom app can be built. On the Applications page, select the Application sources tab to view all the sources that you can build custom applications from.
To view the application source for a specific application, select the application's actions menu and click Navigate to source.
Add an application source¶
To create a new application source from the Applications page, click Add > New application source.
The new application source is immediately added to the page. Select the new application source to begin configuring it.
Configure an application source¶
After selecting an application source, you can choose its base environment, upload files to the source, and create runtime parameters.
Whenever you edit any of these components of an application source, you create a new version of the source. You can select any version of a source from the Version dropdown.
To view the history of changes made to an application version, choose a version of the application from the list in the left-hand column. Then, expand the right-hand column next to the history icon () to view the history of changes made.
Environment¶
Custom apps run inside of environments (Docker containers). Environments include the packages, language, and system libraries used by the custom app. Select a DataRobot-provided environment for the application source from the dropdown under the Environment header. DataRobot offers a predefined base environment named [Experimental] Python 3.9 Streamlit
.
Files¶
In the Files section, you can assemble the files that make up the custom application source. Drag files into the box, or use the options in this section to create or upload the files required to assemble a custom job:
Option | Description |
---|---|
Choose from source / Upload | Upload existing custom job files (run.sh , metadata.yaml , etc.) as Local Files or a Local Folder. |
Create | Create a new file, empty or containing a template, and save it to the custom job:
|
If you choose to create a blank text file, enter the information into the file, name it using a full path (including the folder it belongs to and the file extension), then click Save.
Resources¶
Availability information
Runtime parameters for custom applications are off by default. Contact your DataRobot representative or administrator for information on enabling this preview feature.
Feature flags: Enable Custom Applications Workshop, Enable Runtime Parameters and Resource Limits, and Enable Resource Bundles
After creating an application source, you can configure the resources an application consumes to minimize potential environment errors in production. DataRobot allows you to customize resource limits and the replicas number. To edit the resources bundle:
-
Select an application source. In the Resources section, click () Edit:
-
In the Update resources dialog box, configure the following settings:
Setting Description Bundle Select a resource bundle from the dropdown that determines the maximum amount of memory and CPU that can be allocated for a custom application. Replicas Sets the number of replicas executed in parallel to balance workloads when a custom application is running. The default value is 1, and the maximum value is 4. -
Once you have configured the resource settings for the application source, click Save.
Runtime parameters¶
Availability information
Runtime parameters for custom applications are off by default. Contact your DataRobot representative or administrator for information on enabling this preview feature.
Feature flag: Enable Runtime Parameters and Resource Limits
Create and define runtime parameters used by the custom app built from the application source.
You can add runtime parameters to a custom app by including them in a metadata.yaml
file, making your custom app easier to reuse. A template for this file is available from Files > Create dropdown.
To define runtime parameters, you can add the following runtimeParameterDefinitions
in metadata.yaml
:
Key | Description |
---|---|
fieldName |
Define the name of the runtime parameter. |
type |
Define the data type the runtime parameter contains: string , boolean , numeric credential . |
defaultValue |
(Optional) Set the default string value for the runtime parameter (the credential type doesn't support default values). |
minValue |
(Optional) For numeric runtime parameters, set the minimum numeric value allowed in the runtime parameter. |
maxValue |
(Optional) For numeric runtime parameters, set the maximum numeric value allowed in the runtime parameter. |
allowEmpty |
(Optional) Set the empty field policy for the runtime parameter:
|
description |
(Optional) A description of the purpose or contents of the runtime parameter. |
Note
If you define a runtime parameter without specifying a defaultValue
, the default value is None
.
name: runtime-parameter-example
type: inference
targetType: regression
runtimeParameterDefinitions:
- fieldName: my_first_runtime_parameter
type: string
description: My first runtime parameter.
- fieldName: runtime_parameter_with_default_value
type: string
defaultValue: Default
description: A string-type runtime parameter with a default value.
- fieldName: runtime_parameter_boolean
type: boolean
defaultValue: true
description: A boolean-type runtime parameter with a default value of true.
- fieldName: runtime_parameter_numeric
type: numeric
defaultValue: 0
minValue: -100
maxValue: 100
description: A boolean-type runtime parameter with a default value of 0, a minimum value of -100, and a maximum value of 100.
- fieldName: runtime_parameter_for_credentials
type: credential
allowEmpty: false
description: A runtime parameter containing a dictionary of credentials.
The credential
runtime parameter type supports any credentialType
value available in the DataRobot REST API. The credential information included depends on the credentialType
, as shown in the examples below:
Note
For more information on the supported credential types, see the API reference documentation for credentials.
Credential Type | Example |
---|---|
basic |
basic: credentialType: basic description: string name: string password: string user: string |
azure |
azure: credentialType: azure description: string name: string azureConnectionString: string |
gcp |
gcp: credentialType: gcp description: string name: string gcpKey: string |
s3 |
s3: credentialType: s3 description: string name: string awsAccessKeyId: string awsSecretAccessKey: string awsSessionToken: string |
api_token |
api_token: credentialType: api_token apiToken: string name: string |
Manage an application source in a codespace¶
You can open and manage application sources in a codespace, allowing you to directly edit a source's files and upload new files to it.
To open an application source in a codespace, navigate to the source on Applications > Application sources page. Select it to view its contents and click Open in Codespace.
The application source will open in a codespace, where you can directly edit the existing files, upload new files, or use any of the codespace functionality.
After you finish making changes to the application source in the codespace, click Save. The application source version is updated with your changes. If you previously deployed the version of the application source that you are modifying, saving creates a new source version. Otherwise, saving maintains the same source version. If you do not want to save, click Cancel. Otherwise, click Proceed.
After saving the codespace, DataRobot returns you to the Application sources page, listing the new source version in the Version dropdown.
Replace an application source¶
After using an application, you may want to replace its source. Replacing an application source carries over the following from the original application:
- The application code
- The underlying execution environment
- Number of replicas
- Runtime parameters and secrets are copied over
- The t-shirt size (small, medium, or large) of the containers
To replace an application source, find the application on the All applications tab, open the actions menu, and select Replace source.
In the modal, select an application source from the dropdown to replace the one currently used by the application. Each source indicates its source version. You can use the search bar to specify an application source. After selecting a replacement source, click Confirm.
As the source is replaced, all users with access to the application and still use it, even though the Open button is disabled during replacement.