To deploy a model, create a model ready for deployment in your deployment space and then upload your model as an archive. Once deployed you can submit jobs to your model and monitor job states.
Before you begin
- Log in to IBM Cloud.
- Create your API key. Copy or download it from the API key successfully created open window (you cannot access it again once you close this pane).
- Create or select a Machine Learning service. Copy the service instance name, GUID and CRN from the information pane for your instance in the Resource List>Services view on IBM Cloud. (Expand the list of services in the Resource List window. Click anywhere in the row next to your Machine Learning Service name, but not on the name itself. This opens the information pane in the same window.)
- Create or select a Cloud Object Storage. Copy the Cloud Object Storage instance name and CRN from the information pane from the information pane for your instance in the Resource List>Storage view on IBM Cloud.
- Create a deployment space, from the user interface, Then view it and copy your Space ID from the settings tab. For more information see Deployment spaces.
About this task
These instructions assume that you have already built your Decision Optimization model.
To deploy a Decision Optimization model:
- Package your Decision Optimization model
formulation with your common data (optional) ready for deployment as a
.zipfile.Your archive can include the following optional files:
- Your model files
- Settings (see Solve parameters for more information)
- Common data
Create a model ready for deployment in Watson Machine Learning
providing the following information:
You obtain a MODEL-ID. Your Watson Machine Learning model can then be used in one or multiple deployments.
- Machine Learning service instance
- Deployment space instance
- the software specification (Decision Optimization
- do_12.10 runtime is based on CPLEX V.12.10
- do_12.9 runtime is based on CPLEX V.12.9
- the model type:
- opl (do-opl_<runtime version>)
- cplex (do-cplex_<runtime version>)
- cpo (do-cpo_<runtime version>)
- docplex (do-docplex_<runtime version>) using Python 3.6
(The Runtime version can be one of the available runtimes so, for example, an opl model with runtime 12.10 would have the model type do-opl_12.10.)
- Upload your model archive (
.zipfile) on Watson Machine Learning. See Model input and output data file formats for information about input file types.
- Deploy your model using the MODEL-ID, SPACE-ID. and the hardware
specification for the available configuration sizes (small S, medium M, extra large XL). See
configurations. You obtain a DEPLOYMENT-ID.
- Monitor the deployment using the DEPLOYMENT-ID. Deployment states can be:
- Submit jobs to your deployment. You obtain a JOB-ID.
- Monitor your jobs using the JOB-ID.
See also the RunDeployedModel and ExtendWMLSoftwareSpec notebooks in the DO-samples on the Decision Optimization GitHub.