# ibm-ai-openscale-cli
![Status](https://img.shields.io/badge/status-beta-yellow.svg)
[![Latest Stable Version](https://img.shields.io/pypi/v/ibm-ai-openscale-cli.svg)](https://pypi.python.org/pypi/ibm-ai-openscale-cli)
IBM Watson Openscale "express path" configuration tool. This tool allows the user to get started quickly with Watson OpenScale.
* If needed, automatically provision a Lite plan instance for IBM Watson OpenScale
* If needed, automatically provision a Lite plan instance for IBM Watson Machine Learning
* Drop and re-create the IBM Watson OpenScale datamart instance and datamart database schema
* Optionally, deploy a sample machine learning model to the WML instance
* Configure the sample model instance to OpenScale, including payload logging, fairness checking, feedback, quality checking, drift checking, business KPI correlation checking, and explainability
* Optionally, store up to 7 days of historical payload, fairness, quality, drift, and business KPI correlation data for the sample model
* Upload new feedback data, generate 100 new live scoring predictions, run fairness, quality, drift, and correlation checks, and generate one explanation
## What's new in this release
* Support for business KPI correlation monitoring added to the built-in sample GermanCreditRisk model, including 7 days of correlation history
* Support for WML v4 python client, using the new `--v4` option. Note that this requires some manual intervention:
1. manually uninstall the regular watson-machine-learning-client python package (if installed),
2. manually install the watson-machine-learning-client-V4 python package,
3. and only then install or upgrade ibm-ai-openscale-cli.
* Other bug fixes and stability improvements
## Before you begin
* You need an [IBM Cloud][ibm_cloud] account.
* Create an [IBM Cloud API key](https://console.bluemix.net/docs/iam/userid_keys.html#userapikey)
* If you already have a Watson Machine Learning (WML) instance, ensure it's RC-enabled, learn more about this in the [migration instructions](https://console.bluemix.net/docs/resources/instance_migration.html#migrate).
## Installation
To install, use `pip` or `easy_install`:
```bash
pip install -U ibm-ai-openscale-cli
```
or
```bash
easy_install -U ibm-ai-openscale-cli
```
## Usage
```
ibm-ai-openscale-cli --help
usage: ibm-ai-openscale-cli [-h] (-a APIKEY | -i IAM_TOKEN)
[--env {ypprod,ypqa,ypcr,ys1dev,icp}]
[--resource-group RESOURCE_GROUP]
[--postgres POSTGRES] [--icd ICD] [--db2 DB2]
[--wml WML] [--azure-studio AZURE_STUDIO]
[--azure-service AZURE_SERVICE] [--spss SPSS]
[--custom CUSTOM] [--aws AWS]
[--deployment-name DEPLOYMENT_NAME]
[--keep-schema] [--username USERNAME]
[--password PASSWORD] [--url URL]
[--datamart-name DATAMART_NAME]
[--history HISTORY] [--history-only]
[--history-first-day HISTORY_FIRST_DAY]
[--model MODEL] [--list-models]
[--custom-model CUSTOM_MODEL]
[--custom-model-directory CUSTOM_MODEL_DIRECTORY]
[--extend] [--protect-datamart]
[--reset {metrics,monitors,datamart,model,all}]
[--verbose] [--version] [--v4]
[--wml-plan {lite,standard,professional}]
[--openscale-plan {lite,standard}]
[--disable-bkpi][--generate-drift-history]
IBM Watson Openscale "express path" configuration tool. This tool allows the
user to get started quickly with Watson OpenScale: 1) If needed, provision a
Lite plan instance for IBM Watson OpenScale 2) If needed, provision a Lite
plan instance for IBM Watson Machine Learning 3) Drop and re-create the IBM
Watson OpenScale datamart instance and datamart database schema 4) Optionally,
deploy a sample machine learning model to the WML instance 5) Configure the
sample model instance to OpenScale, including payload logging, fairness
checking, feedback, quality checking, drift, business KPI, and explainability
6) Optionally, store up to 7 days of historical payload, fairness, quality,
drift, and business KPI data for the sample model 7) Upload new feedback data,
generate 100 new live scoring predictions, run fairness, quality, drift, and
business KPI checks, and generate one explanation
optional arguments:
-h, --help show this help message and exit
--env {ypprod,ypqa,ypcr,ys1dev,icp}
Environment. Default "ypprod"
--resource-group RESOURCE_GROUP
Resource Group to use. If not specified, then
"default" group is used
--postgres POSTGRES Path to postgres credentials file for the datamart
database. If --postgres, --icd, and --db2 all are not
specified, then the internal Watson OpenScale database
is used
--icd ICD Path to IBM Cloud Database credentials file for the
datamart database
--db2 DB2 Path to IBM DB2 credentials file for the datamart
database
--wml WML Path to IBM WML credentials file
--azure-studio AZURE_STUDIO
Path to Microsoft Azure credentials file for Microsoft
Azure ML Studio
--azure-service AZURE_SERVICE
Path to Microsoft Azure credentials file for Microsoft
Azure ML Service
--spss SPSS Path to SPSS credentials file
--custom CUSTOM Path to Custom Engine credentials file
--aws AWS Path to Amazon Web Services credentials file
--deployment-name DEPLOYMENT_NAME
Name of the existing deployment to use. Required for
Azure ML Studio, SPSS Engine and Custom ML Engine, but
optional for Watson Machine Learning. Required for
custom models
--keep-schema Use pre-existing datamart schema, only dropping all
tables. If not specified, datamart schema is dropped
and re-created
--username USERNAME ICP username. Required if "icp" environment is chosen,
not required if --iam-token is specified
--password PASSWORD ICP password. Required if "icp" environment is chosen,
not required if --iam-token is specified
--url URL ICP url. Required if "icp" environment is chosen
--datamart-name DATAMART_NAME
Specify data mart name and database schema, default is
the datamart database connection username. For
internal database, the default is "wosfastpath"
--history HISTORY Days of history to preload. Default is 7
--history-only Store history only for existing deployment and
datamart. Requires --extend and --deployment-name also
be specified
--history-first-day HISTORY_FIRST_DAY
Starting day for history. Default is 0
--model MODEL Sample model to set up with Watson OpenScale (default
"GermanCreditRiskModel")
--list-models Lists all available models. If a ML engine is
specified, then modesl specific to that engine are
listed
--custom-model CUSTOM_MODEL
Name of custom model to set up with Watson OpenScale.
If specified, overrides the value set by --model. Also
re