Model deployment

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

You must have an IBM Cloud account. See
  1. Log in to IBM Cloud.
  2. 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).
  3. 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.)
  4. Create or select a Cloud Object Storage. Copy the Cloud Object Storage instance name and CRN from the information pane for your instance in the Resource List>Storage view on IBM Cloud.
  5. 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:

  1. Package your Decision Optimization model formulation with your common data (optional) ready for deployment as a tar.gz or .zip file.
    Your archive can include the following optional files:
    1. Your model files
    2. Settings (see Solve parameters for more information)
    3. Common data
  2. Create a model ready for deployment in Watson Machine Learning providing the following information:
    • Machine Learning service instance
    • Deployment space instance
    • the software specification (Decision Optimization runtime version):
      • 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.)

    You can extend the software specification provided by Watson Machine Learning. See the ExtendWMLSoftwareSpec notebook in the DO-samples on the Decision Optimization GitHub

    You obtain a MODEL-ID. Your Watson Machine Learning model can then be used in one or multiple deployments.
  3. Upload your model archive (tar.gz or .zip file) on Watson Machine Learning. See Model input and output data file formats for information about input file types.
  4. 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.
  5. Monitor the deployment using the DEPLOYMENT-ID. Deployment states can be: initializing, updating, ready, or failed.
  6. Submit jobs to your deployment.
    You obtain a JOB-ID.
  7. Monitor your jobs using the JOB-ID.


See REST API example.

See also the RunDeployedModel and ExtendWMLSoftwareSpec notebooks in the DO-samples on the Decision Optimization GitHub.