Table of contents

Model management and deployment in IBM Watson Machine Learning

To expose a checkpoint of assets to outside users, a Deployment Admin can create a project release and deploy the assets within it. A project release represents a project tag that can be launched as a production environment within Watson Studio Local.

The IBM Watson Machine Learning client requires Deployment Admin permissions to create a project release. Only the Watson Studio Local administrator can assign Deployment Admin permissions to a Watson Studio Local user.

Prerequisite: At least one Watson Studio Local deployment node must be installed and available for a project release to launch successfully. If no deployment node was installed, the Watson Studio Local administrator can add a new deployment node (that meets the software requirements) from the Nodes page of the Admin Console.
Trial license only: During the Watson Machine Learning trial period, you can label your compute nodes as deployment nodes by running /wdp/utils/add_remove_deploy.sh --add-deploy-to-compute. Then after you upgrade to an enterprise license, you must run /wdp/utils/add_remove_deploy.sh --remove-deploy-from-compute to remove the deployment labels and delete all of the related pods.

Create a project release

A Deployment Admin creates a project release out of the state of a project at a given point in time as denoted by a user-defined tag. After the project release is created, assets within this project release can then be deployed.

If you create a project release from a Watson Studio Local source project, this source project must have a tag (specified from the Commit and push window). If you create a project release from a remote Git repository, the project must also have a valid tag.

Commit and push

Restriction: You cannot create a release for a library project.

To create a project release, complete the following steps:

  1. In the Watson Machine Learning client, go to the Project releases page and click Add Project Release. Project releases
  2. Click From Watson Studio Local and select a source project and tag in Watson Studio Local to associate the release to. Click From repository to import a release from a Git repo (a personal access token is required). Click From file to import a preexisting project from your local device (note that the file must be an exported project; an exported project release is not accepted). Ensure that the file name and release name do not contain a space.
  3. Type in a name that is descriptive and unique. The name can contain hyphens but not special characters such as a period (.).
  4. Type the route to use. The route is the unique ID for the project release, and is used within the deployments' REST paths and URLs. It can contain at least 2 and at most 26 lowercase alphanumeric characters and hyphens, and must start with a letter and end with a letter or number.
  5. Click Create.

Watson Machine Learning creates an offline release, unlocked for editing. You can now click the Members tab to assign an Admin to the release. By default, the Admin of the release is you.

Assign members

In a project release, the Admin can click the Members tab and add members to the release with one of the following permissions:

Admin
Administer the project release, its asset deployments, and its members. By default, the creator of the release is the Admin of the release.
Developer
View the project release with read-only access and use its existing deployments.
Viewer
View the project release with read-only access.

In the Watson Machine Learning client, Watson Studio Local users can only see the project releases that they are a member of.

Permissions Deployment Admin (cluster) Admin (release) Developer (release) Viewer (release)
Create release Y N N N
Modify, lock, or delete release n/a Y N N
Launch release n/a Y N N
Export release n/a Y N N
View release n/a Y Y Y
Create, delete, or update deployments n/a Y N N
View deployments n/a Y Y Y
Add, delete, or update members n/a Y N N
View members n/a Y Y Y
Edit workers n/a Y N N
Access deployment token n/a Y Y N
Test API n/a Y Y N
Run job n/a Y Y N
View dashboard n/a Y Y Y
View notebooks and shiny app URLs n/a Y Y Y

Deploy assets

An Admin can deploy an asset into a project release. The deployment action creates a read-only snapshot of the asset. The following types of assets can be deployed:

Asset Job Web service App Notes
Notebooks Y N Y Only Jupyter notebooks can be deployed. Zeppelin and H2O Flows are not supported by Watson Machine Learning.
Models N Y N Requires that you associate a batch scoring script with it.
R Shiny N N Y Deploys the R code inside of an R pod.
Flows Y N N Flows from SPSS Modeler.
Decision Optimization Models N Y N Provides a REST API to submit and execute optimization jobs.
Scripts Y Y N  
Model groups N Y* N * Can be deployed as a web service group.
When the project release launches, each enabled deployment automatically generates either a permalink URL or REST API endpoint where the asset can be accessed:
Job
Generates a REST API endpoint to start, stop, and get status for that job. The job can be scheduled (but not unscheduled), and is visible to authenticated users only.
Web service
Generates a REST API endpoint for an external application to call. The web service is visible to authenticated users only.
Web service group
Generates a REST API endpoint for an external application to call. The web service group is visible to authenticated users only. In the Edit test settings page, you can set the leader and enable the following routing configurations:
Leader
Allows API requests to the leader of the group. The Routing-Option header in the API request must be set to leader. This is the default.
Specific model
Allows API requests to a specific model version in the group. The Routing-Option header in the API request must be set to specific.
Random model
Allows API requests to a randomly selected model version in the group. The Routing-Option header in the API request must be set to random.
All models
Allows requests to every enabled model version in the group. The Routing-Option header in the API request must be set to all.
App
Generates a URL that runs the asset code as an interactive UI session. You can specify the Shared with setting to be either:
Anyone with the link
Anyone outside person can view it.
Any authenticated user
Only signed users can view it.
Deployment Admin
Only the creator of the project release can view it.

To deploy an asset, complete the following steps:

  1. In the Watson Machine Learning client, go to your project release and click the Assets tab. Project release assets tab
  2. Click the asset. Ensure that the first character in the asset name is not a digit.
  3. Depending on the asset, click the type of deployment you want to create.
  4. Fill out the fields. If applicable, select which version to deploy.
  5. Reserve resources for the computing environment associated with the deployment.
    Important: Turning Reserve resources off can affect system performance if available CPU and RAM on the servers become overcommitted.
  6. For a web service, select the number of replicas (pod copies across which requests to the deployment are load balanced). A job and app deployment can only use one replica.
  7. Click the Create button.

All deployments remain disabled until the project release is launched. If the project release is already online, your newly created deployment starts immediately.

Launch a project release

An Admin can click the Launch icon to bring the release online. Wait around a minute for the pods to start and each enabled deployment to activate (you can monitor the status in the Active environments panel) before you click any actions for the deployment. You might also see a similar time delay when you stop or start a script for model deployment.

If you deployed a job, click it to view the REST API endpoint for an external application or to run the job on demand. When the release is online, you can click the API tab and submit a request to Start, Stop, or get Status for the job. You can also click generate code to copy/paste the curl command with the deployment bearer token in it.

If you deployed a web service, it will have a REST API endpoint for an external application to call. From the deployment details API tab, you can submit a JSON request or click generate code to copy/paste the curl command with the deployment bearer token in it. For an R script, ensure RStudio environment is in running state before you run the curl command (otherwise you might receive a 502 Bad Gateway error).

If you deployed an app, click it to view the URL to the interactive UI session.

You cannot take a release offline; you can only delete the release.

Manage a project release

An Admin can manage a release and deploy assets inside of them. Tasks include:
View
To view the details of a release, click View next to it.
Project release dashboard
Update
To pull in the latest assets from the source project and update the deployments with them, click Update next to the release. This action only updates modified assets and adds new assets to the release. It does not delete assets from the release.
Export
To export the deployment settings of a release (for use in another release), click Export deployment settings next to it. You can then upload these same deployment setting into another offline release by clicking the Import deployment settings icon and dragging the settings file into the Input pane.

Click the Validate File button to compare these imported settings with the current settings for your release. If the Differences look acceptable, you can click Submit to update your release manifest accordingly. Existing settings will be updated, new settings will be added, and unaffected settings will remain unchanged.

Lock
To lock a release so that no one can edit it, click Lock next to it. You can click Unlock to reopen the release for editing.
Delete
To delete a release and all of its deployments, click Delete next to it. Alternatively, you can click the Delete icon from the release details page.

Manage deployments

From the Deployments tab of your project release, an Admin, Developer, or Viewer can click a deployment for an overview of its details including request metrics captured at the function level.

Only the Admin can start, stop, delete, or redeploy any deployment in the release. Note that if you redeploy a new version of any of the assets, the URL does not change.

Project release deployments

For an app, the Admin can edit its settings, edit is visibility, and view its route.

View data sources

In the Watson Machine Learning client, click the Data sources to view your project data sources. You can also edit the production data source connection string and credentials by clicking Edit credentials next to the data source.

Important: Database credentials must be input again after creating a project release. Otherwise, the data source might not work.

View active environments

In the Watson Machine Learning client, click the Active environments tab to monitor all runtime environments, workers, and services to Watson Studio Local.

Edit workers

In the Watson Machine Learning client, click the Workers tab to select and configure workers, including custom images. The Deployment Admin can then select the updated worker when they deploy a job.

Project release workers page

Project release workers page