Decision Optimization

 View Only

Updating your CPLEX runtime or Python version in Decision Optimization in Cloud Pak for Data as a Service

By Shirley de Jonk posted Thu April 28, 2022 08:32 AM

  

As CPLEX engine performance improves with each new version, older versions are deprecated and removed over time. Runtimes, based on these engines, are used in building and deploying Decision Optimization models.

For example, as of May 17, 2022, CPLEX 12.10 is removed and its equivalent do_12.10 runtime is no longer supported.

How do you change your CPLEX runtime version ?

For Decision Optimization experiments
 You can view and change your CPLEX runtime in the experiment Overview by opening the Environment tab of the Information pane and selecting one of the available environments for your type of model (Python, OPL, CPLEX, CPO). See Overview for more details.

Default Python environment expanded in environment pane of Overview

 

Deployed models
When deploying Decision Optimization models you specify an available runtime with your model type. For example, for an OPL model with CPLEX 20.1 you specify do-opl_20.1 in your software specification. See Model deployment for more information about runtimes and software specifications.


If you have already deployed your model with a CPLEX runtime that is no longer supported, you can update your existing deployed model using either the REST API or the UI.

How do you change your Python version?

Similarly, Python versions are also regularly updated. For example, as from May 17, 2022, the default Python for Decision Optimization users is 3.9 and previous versions of Python are removed.

Python is used to run Decision Optimization models formulated in DOcplex (a native Python API for Decision Optimization) in both Decision Optimization experiments and Jupyter notebooks. Modeling Assistant models also use Python because DOcplex code is generated when models are deployed. Models formulated in OPL (a modeling language), or in specific file formats for CPLEX or CP Optimizer (the solver engines), such as LP or CPO formats, are not affected by this Python update.

If your models use the default Python version no change is required because the upgrade will be handled automatically. If however you have explicitly specified an older Python version in your model, you must update this version specification or your models will not work.

Decision Optimization experiments
You can view and change the Python environment in the experiment Overview on the Environment tab of the Information pane. See Overview for more details. You can create environments by selecting "new Python environment" in the Environment tab drop-down menu. This sets the environment to be used by default for your experiment. You can also choose different environments for individual scenarios on the Environment tab of the Run configuration pane. This can be useful if you don't want certain scenarios to use the default environment (this is when more than one Python version is supported, but currently only Python 3.9 is available). See Run environment tab for more details.


Jupyter notebooks
You can change your Python version by changing the environment in your notebook. For Jupyter notebooks that use older versions of Python, you can change the Python version by selecting Change environment in the list of actions. Before you can edit your notebook, you must first select a supported environment. When your notebook is open for editing, you can select an environment definition on the Environment tab in the Information pane in your notebook. See Decision Optimization notebooks.


Existing deployed models
You can either recreate and redeploy your model, or change the Python version using the REST API  without having to redeploy your model.

#DecisionOptimization
0 comments
20 views

Permalink

Comments

Currently no comments.