Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ibm
GitHub Repository: ibm/watson-machine-learning-samples
Path: blob/master/README.md
9175 views

Sample notebooks for IBM watsonx.ai for IBM Cloud and IBM watsonx.ai software product

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.

Deployments

This section contains sample notebooks with examples of how to serve different types of models, either as online or batch jobs.

NotebookDescriptionCLOUDCPD3.5CPD4.0CPD4.5CPD4.6CPD4.7CPD4.8CPD5.0CPD5.1CPD5.2CPD5.3
Use custom software spec to create statsmodels functionDemonstrates how to deploy in watsonx.ai Runtime service a Python function with statsmodel library.linklinklinklinklinklinklinklinklinklinklink
Use Keras to recognize hand-written digitsDemonstrates support of Keras model deployment and scoring in the watsonx.ai service.linklinklinklinklinklinklinklinklinklinklink
Use PMML to predict iris speciesDemonstrates support of PMML model deployment and scoring in the watsonx.ai service.linklinklinklinklinklinklinklinklinklinklink
Use Pytorch to recognize hand-written digitsDemonstrates support of PyTorch model deployment and scoring in the watsonx.ai service.linklinklinklinklinklinklinklinklinklinklink
Use scikit-learn and custom library to predict temperatureDemonstrates support for training a scikit-learn model that uses a custom defined transformer and using it with watsonx.ai Runtime service.linklinklinklinklinklinklinklinklinklinklink
Use scikit-learn to recognize hand-written digitsDemonstrates how to persist and deploy a locally trained scikit-learn model in watsonx.ai.linklinklinklinklinklinklinklinklinklinklink
Use Spark to predict credit riskDemonstrates support for Apache Spark model persistance, deployment, and scoring.linklinklinklinklinklinklinklinklinklinklink
Use SPSS to predict customer churnDemonstrates support for deploying SPSS models and scoring data against it.linklinklinklinklinklinklinklinklinklinklink
Use Tensorflow to recognize hand-written digitsDemonstrates support of Tensorflow model deployment and scoring in the watsonx.ai service.linklinklinklinklinklinklinklinklinklinklink
Use Time Series Foundation Models and timeseries data to predict energy demandDemonstrates 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-------linklinklink
Use watsonx Text Extraction V2 service to extract text from fileDemonstrates support for Text Extraction V2 using ibm-watsonx-ai Python SDK.link--------linklink
Use watsonx to manage Prompt Template assets and create deploymentDemonstrates how to create a Prompt Template Asset and how to create a deployment pointing on it.link-----linklinklinklinklink
Use watsonx to run generate_batch job using AI serviceDemonstrates support of watsonx.ai AI service for adding documents to vector store.link--------linklink
Use watsonx, and Elasticsearch Python SDK to answer questions (RAG)Demonstrates support of Retrieval Augumented Generation in watsonx.ai using Elasticsearch vector store.link-----linklinklinklinklink
Use watsonx, and LangChain to make a series of calls to a language modelDemonstrates how to chain LLMs to generate a sequence of creating a random question on a given topic and an answer to that question.link-----linklinklinklinklink
Use watsonx, and LLM model for image processing to generate a description of the IBM logoDemonstrates support for image processing Chat models in watsonx.ai using a LLM.link-------linklinklink
Use watsonx, and LLM to analyze car rental customer satisfaction from textDemonstrates support of text sentiment analysis in watsonx using a LLM.link-----linklinklinklinklink
Use watsonx, and LLM to find sentiments of legal documentsDemonstrates support of text sentiment analysis of legal documents in watsonx using a LLM.link--------linklink
Use watsonx, and LLM to Fine Tune with LoRA on online banking queries annotatedDemonstrates support of LoRA Fine Tuning in watsonx using a LLM.link-------linklinklink
Use watsonx, and LLM to make simple chat conversation and tool callsDemonstrates support for Chat models, including the integration of tools and a LLM available in watsonx.ai.link-------linklinklink
Use watsonx, and LLM to run as an AI serviceDemonstrates support for watsonx.ai AI service using a LLM.link-------linklinklink
Use watsonx, and LLM to summarize legal Contracts documentsDemonstrates support of text summarization in watsonx using a LLM.link--------linklink
Use watsonx, and LLM with support for tools to perform simple calculationsDemonstrates support for Chat models, including the integration of tools using LangGraph and a LLM available in watsonx.ai.link-------linklinklink
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-----linklinklinklinklink
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-----linklinklinklinklink
Use XGBoost to classify tumorsDemonstrates how to get data from the IBM Watson Studio Community, create a predictive model, and start scoring new data.linklinklinklinklinklinklinklinklinklinklink

Experiments

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.

NotebookDescriptionCLOUDCPD3.5CPD4.0CPD4.5CPD4.6CPD4.7CPD4.8CPD5.0CPD5.1CPD5.2CPD5.3
Use AutoAI and Lale to predict credit riskDemonstrates how to use AutoAI experiments by getting a German credit data set and training the model to predict banking credit.linklinklinklinklinklinklinklinklinklinklink
Use AutoAI and timeseries data to predict COVID casesDemonstrates how to use AutoAI experiments for timeseries data sets in Watson Machine Learning service.link--linklinklinklinklinklinklinklink
Use AutoAI RAG and Chroma to create a pattern about IBMDemonstrates the usage of IBM AutoAI RAG with Chroma vector store.link-------linklinklink
Use AutoAI RAG and Milvus to create a pattern about IBMDemonstrates the usage of IBM AutoAI RAG with Milvus vector store.link-------linklinklink
Use AutoAI RAG with custom foundation modelDemonstrates how to deploy custom foundation model and use this model in AutoAI RAG experiment.link--------linklink
Use AutoAI RAG with predefined Milvus index to create a pattern about IBMDemonstrates the usage of IBM AutoAI RAG with predefined vector store collection.link---------link
Use AutoAI RAG with SQL knowledge base referenceDemonstrates the usage of IBM AutoAI RAG with SQL database as knowledge source.link---------link
Use AutoAI RAG with watsonx Text Extraction serviceDemonstrates how to process data using the IBM watsonx.ai Text Extraction service and use the result in an AutoAI RAG experiment.link-------linklinklink
Use AutoAI to train fair modelsDemonstrates how to use AutoAI experiments with bias detection/mitigation in Watson Machine Learning.link--linklinklinklinklinklinklinklink
Use Lale AIF360 DisparateImpactRemover to mitigate bias for credit risk AutoAI modelDemonstrates support of AutoAI experiments in watsonx.ai Runtime service.link--linklinklinklinklinklinklinklink
Use Lale AIF360 scorers to calculate and mitigate bias for credit risk AutoAI modelDemonstrates how to use AutoAI experiments in watsonx.ai Runtime service.linklinklinklinklinklinklinklinklinklinklink

Instance Management

This section contains sample notebooks with examples that show how to work with the Watson Machine Learning instance.

NotebookDescriptionCLOUDCPD3.5CPD4.0CPD4.5CPD4.6CPD4.7CPD4.8CPD5.0CPD5.1CPD5.2CPD5.3
Machine Learning artifacts export and importDemonstrates an example of exporting and importing assets using Watson Machine Learning.linklinklinklinklinklinklinklinklinklinklink
Machine Learning artifacts managementDemonstrates how to manage and clean up a Watson Machine Learning instance.linklinklinklinklinklinklinklinklinklinklink
Space managementDemonstrates how to manage spaces in the context of Watson Machine Learning.linklinklinklinklinklinklinklinklinklinklink

Lifecycle Management

This section contains sample notebooks with examples that show how to update an existing model version and refresh an existing deployment in-place.

NotebookDescriptionCLOUDCPD3.5CPD4.0CPD4.5CPD4.6CPD4.7CPD4.8CPD5.0CPD5.1CPD5.2CPD5.3
Use python API to automate AutoAI deployment lifecycleDemonstrates how to use the AI Lifecycle features from the AutoAI model in Watson Machine Learning.link----linklinklinklinklinklink
Use scikit-learn and AI lifecycle capabilities to predict California house pricesDemonstrates how to use the AI Lifecycle features in watsonx.ai.link------linklinklinklink