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.
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.
You can also programmatically share custom applications using the DRApps CLI.
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.
In addition to sharing custom applications, you may want to grant the ability for users to access and use data from within an application. An application API key grants an application the necessary access to the DataRobot Public API. Sharing roles grant control over the application as an entity within DataRobot, while application API keys grant control over the requests the app can make when a user accesses it.
When a user accesses application, the application web server receives a request from their browser. The application API key is included in the header of the request made to the application in order for them to use it.
Follow to the steps below to configure an application API key.
An application key is automatically created when you build a custom application. To edit the scope of access the key grants, navigate to the application source and create a new version. In the Resources section, click Edit.
From the Update resources modal, you can edit the degree of access for the application API key using the Required key scope level dropdown. Select a role that defines the degree of access the application has to DataRobot's public API when using the key.
The role types have the following access:
Role
Access
None
No access. When you select this role, DataRobot does not supply an application API key.
Viewer
Read-only
User
Create, read, and write
Admin
Create, read, write, and delete
After choosing a role, click Update. When you build a custom application from the source you configured, it will automatically provide an application API key with the scope of access defined by the selected role.
When a user accesses and uses an application, the application API key is included in the header of the request made by the application.
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.
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.
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.
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:
Create metadata.yaml: Creates a basic, editable example of a runtime parameters file.
Create README.md: Creates a basic, editable README file.
Create start-app.sh: Creates a basic, editable example of an entry point file.
Create demo-streamlit.py: Creates a basic, editable Python file.
Create example job: Combines all template files to create a basic, editable app. You can quickly configure the runtime parameters and run this example app.
Create blank file: Creates an empty file. Click the edit icon () next to Untitled to provide a file name and extension, then add your custom contents. In the next step, it is possible to identify files created this way, with a custom name and content, as the entry point. After you configure the new file, click Save.
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.
If you supply a requirements.txt file in an application source, it instructs DataRobot to install Python dependencies when building an app. However, you may also want to install non-Python dependencies. To install these dependencies, application sources can contain a build-app.sh script, called by DataRobot when you build an application for the first time. The build-app.sh script can run npm install or yarn build, allowing custom applications to support dependency installation for JavaScript-based applications.
The example below outlines a sample build-app.sh script for a custom node application.
#!/usr/bin/env sh
cd client
echo "Installing React dependencies from package.json..."
npm install
echo "Building React app..."
yarn run build && rm ./build/index.html
Resource bundling for custom applications is off by default. Contact your DataRobot representative or administrator for information on enabling this feature.
Feature flag: 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
Set 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.
Enable session affinity
Send requests to the same replica. This must be enabled for stateful apps, storing data in the local file system or in memory, e.g., an app that can save chat history to a document and reference it. Some Streamlit components such as the file_uploader throw errors without this setting enabled if more than one replica is available.
Internally run apps on the root path
Allow an app to run on / instead of /apps/{ID}. This setting isn't required if the app automatically handles path configuration (e.g., using Gunicorn or Streamlit). It is useful for web frameworks without a solution to make all routes to work on /apps/{ID}/ (e.g., R-Shiny).
Once you have configured the resource settings for the application source, click Save.
You can create and define runtime parameters to supply different values to scripts and tasks used by a custom application at runtime.
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, numericcredential.
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:
True: (Default) Allows an empty runtime parameter.
False: Enforces providing a value for the runtime parameter before deployment.
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.
Example: metadata.yaml
name:runtime-parameter-exampletype:inferencetargetType:regressionruntimeParameterDefinitions:-fieldName:my_first_runtime_parametertype:stringdescription:My first runtime parameter.-fieldName:runtime_parameter_with_default_valuetype:stringdefaultValue:Defaultdescription:A string-type runtime parameter with a default value.-fieldName:runtime_parameter_booleantype:booleandefaultValue:truedescription:A boolean-type runtime parameter with a default value of true.-fieldName:runtime_parameter_numerictype:numericdefaultValue:0minValue:-100maxValue:100description: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_credentialstype:credentialallowEmpty:falsedescription: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:
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.
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 can still use it, even though the Open button is disabled during replacement.
DataRobot records two types of logs for custom applications: build and runtime logs and access logs. Through these logs, you can monitor an application's build and runtime tasks and review the user access history for an application.
Permissions to view logs
Access to logs for an application require Owner or Editor permissions for the custom application. Owners can view all logs, while Editors can only view build and runtime logs, not access logs.
You can browse logs that detail the history of build and runtime tasks for a custom application. From the Applications page, open the actions menu for the app you want to view logs for, and click View logs.
The logs modal details the history of compiling, building, and executing the custom application. This includes dependency checks, packaging, and any warnings or errors thrown.
Browse access logs to monitor the history of users who have opened or operated a custom application. To view access logs, navigate to the Applications page, open the actions menu for the app you want to view logs for, and click View access logs.
You can also view access logs directly from an application source. Navigate to the Application sources page, locate the application source for your custom application, and expand the dropdown to view the applications built from the source. Then you can click the custom application for which you want to view the access logs to access a detailed view.
From the detailed view for a custom application, scroll down to the Access logs section.
The access logs detail users' visits to the application, including their email, user ID, time of visit, and their role for the application.
Usage logging interval
In addition to the initial access event, every 24 hours of continuous access or use is recorded as an individual visit to the application. For example, when a user opens an application, an access event is logged, then, when that user session exceeds 24 hours of continuous access or use, another access event is logged. This results in two access events logged during a 24 hour and 1 minute custom application visit. In Self-Managed AI Platform environments, this interval is configurable through the CUSTOM_APP_USAGE_METRIC_PUBLISH_MAX_FREQ in the application configuration.