The Python notebook Deploying a Decision Optimization model, available from
the IBM
watsonxResource
hub, illustrates how you can perform the following tasks:
Install the watsonx.ai Runtime Python Client API.
Create a client instance.
Prepare your model archive.
Upload your model.
Create a deployment.
Create and monitor a job with inline data for your deployed model.
Display the solution.
See also the following sample notebooks located in
the jupyter folder of the DO-samples. Select the relevant product and version subfolder..
Deploying a DO model with WML
RunDeployedModel
ExtendWMLSoftwareSpec
The Deploying a DO model with WML sample shows you how to deploy a Decision
Optimization model, create and monitor jobs, and get solutions by using the watsonx.ai Runtime Python
client. This notebook uses the diet
sample for the Decision
Optimization model and takes you through the whole procedure without
using the Decision
Optimizationexperiment UI.
The RunDeployedModel shows you how to run jobs and get solutions from an
existing deployed model. This notebook uses a model
that is saved for deployment from a Decision
Optimizationexperiment UI scenario.
The ExtendWMLSoftwareSpecnotebook shows you how to extend the Decision
Optimization software specification with the watsonx.ai Runtime. By extending the software specification, you can
use your own pip package to add custom code, deploy it in your model and send jobs to it. When you
create your package extension, the name of the compressed file must have the same name as the
package extension, including the package version number. For example,
Thus, for a package that is named
yourpackage-1.0.4.tgz, the following code shows how to create the package
extension. You must use the same package name and version in the NAME
field.
You can also find in the samples several notebooks
for deploying various models, for example CPLEX, DOcplex and OPL models with different types of
data.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.