Monitor Azure machine learning with Watson OpenScale

Get the code


This code pattern uses fictional sales data to create a logistic regression model using Azure. The pattern uses Watson OpenScale to bind the machine learning model deployed in the Azure cloud, create a subscription, and perform payload and feedback logging.


With Watson OpenScale, you can monitor model quality and log payloads, regardless of where the model is hosted. This code pattern uses an example of an Azure model, which demonstrates the independent and open nature of Watson OpenScale. IBM Watson OpenScale is an open environment that enables organizations to automate and operationalize their AI. It provides a powerful platform for managing AI and machine learning models on the IBM Cloud or wherever they might be deployed and offers these benefits:

Open by design: Watson OpenScale allows monitoring and management of machine learning and deep learning models built using any frameworks or IDEs and deployed on any model-hosting engine.

Drive fairer outcomes: Watson OpenScale detects and helps mitigate model biases to highlight fairness issues. The platform provides plain text explanation of the data ranges that have been impacted by bias in the model and visualizations that help data scientists and business users understand the impact on business outcomes. As biases are detected, Watson OpenScale automatically creates a de-biased companion model that runs beside the deployed model, thereby previewing the expected fairer outcomes to users without replacing the original.

Explain transactions: Watson OpenScale helps enterprises bring transparency and auditability to AI-infused applications by generating explanations for individual transactions being scored, including the attributes that were used to make the prediction and weightage of each attribute.

Automate the creation of AI: Neural Network Synthesis (NeuNetS), currently available as a beta, synthesizes neural networks by fundamentally architecting a custom design for a given data set. In the beta, NeuNetS supports image and text classification models. NeuNetS reduces the time and lowers the skill barrier required to design and train custom neural networks, thereby putting neural networks within the reach of non-technical subject matter experts, as well as making data scientists more productive.

When you have completed this code pattern, you will understand how to:

  • Prepare data, train a model, and deploy using Azure
  • Score the model using sample scoring records and the scoring endpoint
  • Set up an Watson OpenScale data mart
  • Bind the Azure model to the Watson OpenScale data mart
  • Add subscriptions to the data mart
  • Enable payload logging and performance monitoring for both subscribed assets
  • Use data mart to access tables data through subscription


Azure machine learning flow diagram

  1. The developer creates a Jupyter Notebook using data from GoSales_Tx.
  2. The Jupyter Notebook is connected to a PostgreSQL database that stores the Watson OpenScale data.
  3. A machine learning model is created using Azure Machine Learning Studio and deployed to the cloud.
  4. Watson OpenScale is used by the notebook to log payload and monitor performance.


Find the detailed steps for this pattern in the readme file. The steps will show you how to:

  1. Clone the repository.
  2. Create a Compose for PostgreSQL database.
  3. Create an Watson OpenScale service.
  4. Run the notebooks.