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.
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.
To create a project release, complete the following steps:
- In the Watson Machine Learning client, go to the Project releases page and click Add Project Release.
- 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.
- Type in a name that is descriptive and unique. The name can contain hyphens but not special characters such as a period (.).
- 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.
- 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.
In a project release, the Admin can click the Members tab and add members to the release with one of the following permissions:
- Administer the project release, its asset deployments, and its members. By default, the creator of the release is the Admin of the release.
- View the project release with read-only access and use its existing deployments.
- 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)|
|Modify, lock, or delete release||n/a||Y||N||N|
|Create, delete, or update deployments||n/a||Y||N||N|
|Add, delete, or update members||n/a||Y||N||N|
|Access deployment token||n/a||Y||Y||N|
|View notebooks and shiny app URLs||n/a||Y||Y||Y|
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:
|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.|
|Model groups||N||Y*||N||* Can be deployed as a web service group.|
- 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:
- 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.
- 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:
- In the Watson Machine Learning client, go to your project release and click the Assets tab.
- Click the asset. Ensure that the first character in the asset name is not a digit.
- Depending on the asset, click the type of deployment you want to create.
- Fill out the fields. If applicable, select which version to deploy.
- 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.
- 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.
- 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
- To view the details of a release, click View next to it.
- 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.
- 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.
- 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.
- 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.
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.
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.
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.
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.