The sample notebooks in this repo demonstrate Watson Machine Learning and watsonx.ai capabilities such as:
- Running experiments on model building using AutoAI or Deep Learning
- Deploying third-party models as web services or batch jobs (i.e.: scikit-learn, xgboost, keras, PMMl, SPSS, etc.)
- Monitoring deployments with OpenScale (drift, bias detection)
- Managing model lifecycles (updating the model version, refreshing a deployment)
- Inferencing watsonx.ai foundation models
- Integrating LangChain with watsonx.ai
Notebooks with Python code and the Python SDK can be found in the python_sdk folder. The REST API examples are organized in the rest_api folder.
This section contains sample notebooks with examples of how to serve different types of models, either as online or batch jobs.
| Notebook | Description | CLOUD | CPD3.5 | CPD4.0 | CPD4.5 | CPD4.6 | CPD4.7 | CPD4.8 | CPD5.0 | CPD5.1 | CPD5.2 | CPD5.3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Use custom software spec to create statsmodels function | Demonstrates how to deploy in watsonx.ai Runtime service a Python function with statsmodel library. | link | link | link | link | link | link | link | link | link | link | link |
| Use Keras to recognize hand-written digits | Demonstrates support of Keras model deployment and scoring in the watsonx.ai service. | link | link | link | link | link | link | link | link | link | link | link |
| Use PMML to predict iris species | Demonstrates support of PMML model deployment and scoring in the watsonx.ai service. | link | link | link | link | link | link | link | link | link | link | link |
| Use Pytorch to recognize hand-written digits | Demonstrates support of PyTorch model deployment and scoring in the watsonx.ai service. | link | link | link | link | link | link | link | link | link | link | link |
| Use scikit-learn and custom library to predict temperature | Demonstrates support for training a scikit-learn model that uses a custom defined transformer and using it with watsonx.ai Runtime service. | link | link | link | link | link | link | link | link | link | link | link |
| Use scikit-learn to recognize hand-written digits | Demonstrates how to persist and deploy a locally trained scikit-learn model in watsonx.ai. | link | link | link | link | link | link | link | link | link | link | link |
| Use Spark to predict credit risk | Demonstrates support for Apache Spark model persistance, deployment, and scoring. | link | link | link | link | link | link | link | link | link | link | link |
| Use SPSS to predict customer churn | Demonstrates support for deploying SPSS models and scoring data against it. | link | link | link | link | link | link | link | link | link | link | link |
| Use Tensorflow to recognize hand-written digits | Demonstrates support of Tensorflow model deployment and scoring in the watsonx.ai service. | link | link | link | link | link | link | link | link | link | link | link |
| Use Time Series Foundation Models and timeseries data to predict energy demand | Demonstrates the use of a pre-trained time series foundation model for multivariate forecasting tasks and showcases the variety of features available in Time Series Foundation Models. | link | - | - | - | - | - | - | - | link | link | link |
| Use watsonx Text Extraction V2 service to extract text from file | Demonstrates support for Text Extraction V2 using ibm-watsonx-ai Python SDK. | link | - | - | - | - | - | - | - | - | link | link |
| Use watsonx to manage Prompt Template assets and create deployment | Demonstrates how to create a Prompt Template Asset and how to create a deployment pointing on it. | link | - | - | - | - | - | link | link | link | link | link |
| Use watsonx to run generate_batch job using AI service | Demonstrates support of watsonx.ai AI service for adding documents to vector store. | link | - | - | - | - | - | - | - | - | link | link |
| Use watsonx, and Elasticsearch Python SDK to answer questions (RAG) | Demonstrates support of Retrieval Augumented Generation in watsonx.ai using Elasticsearch vector store. | link | - | - | - | - | - | link | link | link | link | link |
| Use watsonx, and LangChain to make a series of calls to a language model | Demonstrates how to chain LLMs to generate a sequence of creating a random question on a given topic and an answer to that question. | link | - | - | - | - | - | link | link | link | link | link |
| Use watsonx, and LLM model for image processing to generate a description of the IBM logo | Demonstrates support for image processing Chat models in watsonx.ai using a LLM. | link | - | - | - | - | - | - | - | link | link | link |
| Use watsonx, and LLM to analyze car rental customer satisfaction from text | Demonstrates support of text sentiment analysis in watsonx using a LLM. | link | - | - | - | - | - | link | link | link | link | link |
| Use watsonx, and LLM to find sentiments of legal documents | Demonstrates support of text sentiment analysis of legal documents in watsonx using a LLM. | link | - | - | - | - | - | - | - | - | link | link |
| Use watsonx, and LLM to Fine Tune with LoRA on online banking queries annotated | Demonstrates support of LoRA Fine Tuning in watsonx using a LLM. | link | - | - | - | - | - | - | - | link | link | link |
| Use watsonx, and LLM to make simple chat conversation and tool calls | Demonstrates support for Chat models, including the integration of tools and a LLM available in watsonx.ai. | link | - | - | - | - | - | - | - | link | link | link |
| Use watsonx, and LLM to run as an AI service | Demonstrates support for watsonx.ai AI service using a LLM. | link | - | - | - | - | - | - | - | link | link | link |
| Use watsonx, and LLM to summarize legal Contracts documents | Demonstrates support of text summarization in watsonx using a LLM. | link | - | - | - | - | - | - | - | - | link | link |
| Use watsonx, and LLM with support for tools to perform simple calculations | Demonstrates support for Chat models, including the integration of tools using LangGraph and a LLM available in watsonx.ai. | link | - | - | - | - | - | - | - | link | link | link |
| Use watsonx, Chroma, and LangChain to answer questions (RAG) | Demonstrates support of creating and deploying Retrieval Augumented Generation in watsonx.ai using Chroma vector store. | link | - | - | - | - | - | link | link | link | link | link |
| Use watsonx, Elasticsearch, and LangChain to answer questions (RAG) | Demonstrates support of creating and deploying Retrieval Augumented Generation in watsonx.ai using LangChain and Elasticsearch vector store. | link | - | - | - | - | - | link | link | link | link | link |
| Use XGBoost to classify tumors | Demonstrates how to get data from the IBM Watson Studio Community, create a predictive model, and start scoring new data. | link | link | link | link | link | link | link | link | link | link | link |
This section contains sample notebooks with examples of how to use AutoAI and Deep Learning experiments. The notebooks show how to trigger such an experiment, work with trained models, and do model comparison, refinery, and finally deployment.
| Notebook | Description | CLOUD | CPD3.5 | CPD4.0 | CPD4.5 | CPD4.6 | CPD4.7 | CPD4.8 | CPD5.0 | CPD5.1 | CPD5.2 | CPD5.3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Use AutoAI and Lale to predict credit risk | Demonstrates how to use AutoAI experiments by getting a German credit data set and training the model to predict banking credit. | link | link | link | link | link | link | link | link | link | link | link |
| Use AutoAI and timeseries data to predict COVID cases | Demonstrates how to use AutoAI experiments for timeseries data sets in Watson Machine Learning service. | link | - | - | link | link | link | link | link | link | link | link |
| Use AutoAI RAG and Chroma to create a pattern about IBM | Demonstrates the usage of IBM AutoAI RAG with Chroma vector store. | link | - | - | - | - | - | - | - | link | link | link |
| Use AutoAI RAG and Milvus to create a pattern about IBM | Demonstrates the usage of IBM AutoAI RAG with Milvus vector store. | link | - | - | - | - | - | - | - | link | link | link |
| Use AutoAI RAG with custom foundation model | Demonstrates how to deploy custom foundation model and use this model in AutoAI RAG experiment. | link | - | - | - | - | - | - | - | - | link | link |
| Use AutoAI RAG with predefined Milvus index to create a pattern about IBM | Demonstrates the usage of IBM AutoAI RAG with predefined vector store collection. | link | - | - | - | - | - | - | - | - | - | link |
| Use AutoAI RAG with SQL knowledge base reference | Demonstrates the usage of IBM AutoAI RAG with SQL database as knowledge source. | link | - | - | - | - | - | - | - | - | - | link |
| Use AutoAI RAG with watsonx Text Extraction service | Demonstrates how to process data using the IBM watsonx.ai Text Extraction service and use the result in an AutoAI RAG experiment. | link | - | - | - | - | - | - | - | link | link | link |
| Use AutoAI to train fair models | Demonstrates how to use AutoAI experiments with bias detection/mitigation in Watson Machine Learning. | link | - | - | link | link | link | link | link | link | link | link |
| Use Lale AIF360 DisparateImpactRemover to mitigate bias for credit risk AutoAI model | Demonstrates support of AutoAI experiments in watsonx.ai Runtime service. | link | - | - | link | link | link | link | link | link | link | link |
| Use Lale AIF360 scorers to calculate and mitigate bias for credit risk AutoAI model | Demonstrates how to use AutoAI experiments in watsonx.ai Runtime service. | link | link | link | link | link | link | link | link | link | link | link |
This section contains sample notebooks with examples that show how to work with the Watson Machine Learning instance.
| Notebook | Description | CLOUD | CPD3.5 | CPD4.0 | CPD4.5 | CPD4.6 | CPD4.7 | CPD4.8 | CPD5.0 | CPD5.1 | CPD5.2 | CPD5.3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Machine Learning artifacts export and import | Demonstrates an example of exporting and importing assets using Watson Machine Learning. | link | link | link | link | link | link | link | link | link | link | link |
| Machine Learning artifacts management | Demonstrates how to manage and clean up a Watson Machine Learning instance. | link | link | link | link | link | link | link | link | link | link | link |
| Space management | Demonstrates how to manage spaces in the context of Watson Machine Learning. | link | link | link | link | link | link | link | link | link | link | link |
This section contains sample notebooks with examples that show how to update an existing model version and refresh an existing deployment in-place.
| Notebook | Description | CLOUD | CPD3.5 | CPD4.0 | CPD4.5 | CPD4.6 | CPD4.7 | CPD4.8 | CPD5.0 | CPD5.1 | CPD5.2 | CPD5.3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Use python API to automate AutoAI deployment lifecycle | Demonstrates how to use the AI Lifecycle features from the AutoAI model in Watson Machine Learning. | link | - | - | - | - | link | link | link | link | link | link |
| Use scikit-learn and AI lifecycle capabilities to predict California house prices | Demonstrates how to use the AI Lifecycle features in watsonx.ai. | link | - | - | - | - | - | - | link | link | link | link |