Skip to content

Commit

Permalink
Merge pull request #60 from IBM/v0.5.5.1b
Browse files Browse the repository at this point in the history
V0.5.5.1
  • Loading branch information
victorterpstra authored Mar 8, 2023
2 parents a83a94f + e7dbfa8 commit 066b8d3
Show file tree
Hide file tree
Showing 45 changed files with 714 additions and 4,072 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[//]: # ([Unreleased]## [0.5.5.2b0])

## [0.5.5.1]- 2023-03-06
### Changed
- README documentation updates.
- Removing deprecated modules `deployeddmmodelcpd21.py`, `scenariodbmanager2.py`
### Fixed
- setup.py to include the dse_do_utils.core subpackage

## [0.5.5.0]- 2023-03-04
### Changed
- Bumping version to 0.5.5.0 given the amount of changes and additions
Expand Down
67 changes: 17 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,34 @@ Also contains some functions to create dvars and export .lp files.
4. ScenarioPicker. Interactively pick an existing scenario from a drop-down menu in a notebook. Typically used in visualization notebooks.
5. MapManager. For creating map visualizations using Folium.

## Installation on CPDv4.0
For Cloud Pak for Data v4.0.
## Installation on CPDv4.5
For Cloud Pak for Data v4.5.

### Install in customized environment
CPDv4.0 allows for easy customization of environments.
CPDv4.5 allows for easy customization of environments.
Add the following to the customization configuration:

```
channels:
- fake # or empty
- nodefaults
dependencies:
- pip
- pip:
- dse-do-utils==0.5.0.0
- decision-optimization-client==1.0.0
- dse-do-utils==0.5.5.0
- decision-optimization-client==1.1.0
```
This automatically downloads dse-do-utils from PyPI and installs the package.
(Note: the `fake` / `nodefaults` is a hack to avoid installation of pip itself. This will greatly improve the installation performance.)


## Installation (CPDv2.5)
(For Cloud Pak for Data v2.5)

CPDv2.5 is very different from the previous versions and it has a significant impact on how the dse-do-utils can be installed and used.

Options:
1. Install using pip in a customized environment. This applies to both Jupyter and JupyterLab.
2. Install as a package in JupyterLab.
3. Install as modules in Jupyter
4. Install/use as modules in the DO Model Builder
For air-gapped systems that have no access to PyPI:
1. Download the package from PyPI/Conda from an internet connected system as a wheel/zip file
2. Upload the wheel/zip as a data asset, or place in any location in the JupyterLab file system
3. Add a pip dependency in the environment yaml:

### Install in customized environment
CPDv2.5 allows for easy customization of environments.
Add the following to the customization configuration:
```
- pip:
- dse-do-utils=0.3.0.0
dependencies:
- pip:
- file:///userfs/packages/dse_do_utils-0.5.4.5b4-py3-none-any.whl
```
This automatically downloads dse-do-utils from PyPI and installs the package.

For air-gapped systems that have no access to PyPI:
1. Download the package from PyPI/Conda from an internet connected system as a wheel/zip file
2. Upload the wheel/zip as a data asset
3. Install package from wheel/zip

This downloads the package as a wheel/zip and puts it in the data assets
```
Expand All @@ -86,40 +68,25 @@ This is the basics. For many ore details on other usage, see `InstallationReadMe

## Target environments
To be used within:
1. CPDv2.1 (version 0.2.2.3 is preferred. But version 0.3.0.0 should be backwards compatible.)
2. CPDv2.5 (version 0.3.0.0 and up)
3. WSLv1.2.3 with Python 2.7 (version 0.2.2.3 only)
4. WS Cloud (version 0.4.0.0 and up)
1. CP4D on-prem v4.0 and up
4. CP4DaaS / WS Cloud (version 0.4.0.0 and up)

## DO Model Builder and WML environments
When developing and using optimization models, there are 3 different environments the Python DO model might run in:
1. A notebook environment.
2. The DO Model Builder environment.
3. The WML deployment environment.

In CPDv2.5:
* Only the notebook environment can be regularly customized with the dse-do-utils.
* The Model Builder environment cannot be customized. But, it has a feature to add 'files'.
The dse-do-utils internal modules have been refactored to be able to be uploaded separately as individual modules.
* The WML environment cannot be customized. But the same work-around for adding modules/files to the MB model can be used.

In CPDv3.0:
* The WML environment can be customized using APIs.

In future releases of CPD:
* The DO Model Builder will also allow for environment customization
From CP4D 4.6, all environments can be customized from PyPI packages and wheel files

## Scope of classes/modules
The classes `OptimizationEngine` and `DataManager` are intended to be used within the optimization model code
that will run in the Model Builder and WML deployment. All other classes, in particular the `ScenarioManager` are
designed to be used outside of the Model Builder or WML, e.g. within `#dd-ignore` cells.

Therefore, the limitations in customizing environments can, for the moment, be avoided by not using
the classes `OptimizationEngine` and `DataManager`.

## Requirements
This package requires:
1. [dd-scenario](https://pages.github.ibm.com/IBMDecisionOptimization/dd-scenario-api/dd-scenario-client-python/doc/build/html/). This package provides an interface to the DO scenarios.
This package is only available within WSL and ICPd. It cannot be pip installed in other environments.
1. [decision-optimization-client](https://ibmdecisionoptimization.github.io/decision-optimization-client-doc/). This package provides an interface to the DO scenarios.
This package is available in PyPI, however it only runs within CP4D/CP4DaaS.
2. [docplex](http://ibmdecisionoptimization.github.io/docplex-doc/mp/index.html). This package interfaces with the CPLEX and CP Optimizer optimization engines.
3. [folium](https://github.com/python-visualization/folium). Map visualization. Only for the MapManager.
Binary file modified docs/doc_build/doctrees/dse_do_utils.doctree
Binary file not shown.
Binary file modified docs/doc_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doc_build/doctrees/readme_link.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/doc_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: fb483136bdfcd315e7694691ad1a7688
config: f4e76c7d950753a815ace419e1c4357c
tags: 645f666f9bcd5a90fca523b33c5a78b7
7 changes: 4 additions & 3 deletions docs/doc_build/html/_modules/dse_do_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dse_do_utils &#8212; DSE DO Utils 0.5.5.0 documentation</title>
<title>dse_do_utils &#8212; DSE DO Utils 0.5.5.1b0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/bizstyle.css" />

Expand All @@ -33,7 +33,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">DSE DO Utils 0.5.5.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">DSE DO Utils 0.5.5.1b0 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">dse_do_utils</a></li>
</ul>
Expand All @@ -52,6 +52,7 @@ <h1>Source code for dse_do_utils</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">.datamanager</span> <span class="kn">import</span> <span class="n">DataManager</span>
<span class="kn">from</span> <span class="nn">.optimizationengine</span> <span class="kn">import</span> <span class="n">OptimizationEngine</span>
<span class="kn">from</span> <span class="nn">.scenariomanager</span> <span class="kn">import</span> <span class="n">ScenarioManager</span>
<span class="kn">from</span> <span class="nn">.scenariodbmanager</span> <span class="kn">import</span> <span class="n">ScenarioDbManager</span>
<span class="c1"># from .scenariopicker import ScenarioPicker</span>
<span class="c1"># from .deployeddomodel import DeployedDOModel</span>
<span class="c1"># from .mapmanager import MapManager</span>
Expand Down Expand Up @@ -171,7 +172,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">DSE DO Utils 0.5.5.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">DSE DO Utils 0.5.5.1b0 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">dse_do_utils</a></li>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dse_do_utils.cpd25utilities &#8212; DSE DO Utils 0.5.5.0 documentation</title>
<title>dse_do_utils.cpd25utilities &#8212; DSE DO Utils 0.5.5.1b0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/bizstyle.css" />

Expand All @@ -33,7 +33,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.1b0 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../dse_do_utils.html" accesskey="U">dse_do_utils</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">dse_do_utils.cpd25utilities</a></li>
Expand Down Expand Up @@ -213,7 +213,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.1b0 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../dse_do_utils.html" >dse_do_utils</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">dse_do_utils.cpd25utilities</a></li>
Expand Down
6 changes: 3 additions & 3 deletions docs/doc_build/html/_modules/dse_do_utils/datamanager.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dse_do_utils.datamanager &#8212; DSE DO Utils 0.5.5.0 documentation</title>
<title>dse_do_utils.datamanager &#8212; DSE DO Utils 0.5.5.1b0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/bizstyle.css" />

Expand All @@ -33,7 +33,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.1b0 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../dse_do_utils.html" accesskey="U">dse_do_utils</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">dse_do_utils.datamanager</a></li>
Expand Down Expand Up @@ -458,7 +458,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">DSE DO Utils 0.5.5.1b0 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../dse_do_utils.html" >dse_do_utils</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">dse_do_utils.datamanager</a></li>
Expand Down
Loading

0 comments on commit 066b8d3

Please sign in to comment.