Skip to main content
Version: 1.42

Examples

A collection of public example repositories is available for use with Deeploy, allowing you to deploy models, explainers, and transformers, or to serve as a foundation for your own implementations. Some repositories offer inspiration for specific use cases, while others demonstrate how to deploy different frameworks effectively.

Deployment examples

Custom Docker image

The Example Custom Image AlexNet and Example Custom Image Hello World repositories provide examples for deploying custom Docker images on Deeploy. When using either of these examples, be sure to follow the instructions for Deploying custom Docker images.

PyTorch NLP

The Example PyTorch Bert Sentiment Analysis repository provides a guide for deploying PyTorch NLP models on Deeploy. It features a pre-trained sentiment analysis model and includes a README with step-by-step instructions that can be applied to any PyTorch NLP model with a similar structure.

Azure Machine Learning

The Azure Machine Learning Examples repository serves as an example for understanding how to deploy models on Azure Machine Learning using Deeploy. It includes the necessary code and configuration to deploy a Gaussian Naive Bayes model along with a MACE counterfactual explainer. When working with this example, ensure you meet the prerequisites for Creating Azure Machine Learning deployments.

MLFlow

The Example MLFlow repository serves as a guide for deploying a model and explainer using an MLFlow tracking server and MLFlow model registry. This repository includes a scikit-learn regression model with four input features and a SHAP kernel explainer.

Python Client

The Example Iris LightGBM repository can be used as an example of how to deploy and test a model using the Deeploy Python Client. The repository contains a LightGBM model trained on the Iris flower data set. The train, deploy and test steps are separated in .py files and can act as a starting point for your own implementation.

LLM

The Hackathon Banking Customer Support LLM repository serves as an example for deploying large language models (LLMs) using Deeploy. It includes an LLM specifically configured to answer banking-related queries and a sample transformer that appends text to the end of the response.

Probabilistic model

The Example XGBoost Iris repository contains an example of how to deploy a classification model that returns probabilities for each class. The repository contains an XGBoost model and a SHAP kernel explainer. The model has been trained on the Iris flower data set.

External Deployment

The Example Hello World External Deployment and Example Census External Deployment repositories can be used as examples for onboarding externally deployed models on Deeploy as external Deployments. The external models are based on the Custom docker image example and the SHAP explainer example. Each repository's README provides an endpoint URL and authentication details for an externally deployed mock model, along with a step-by-step tutorial on the Deployment process for external Deployments. The repositories also include metadata to illustrate how external models can be effectively monitored using external Deployments.

Registration Deployment

The Example Census Registration Deployment serves as an example repository for a registration Deployment variant of the SHAP explainer example. It includes example model documentation, such as a model card, data card, and metadata. The README provides a step-by-step guide to creating registration Deployments.

Explainer examples

SHAP explainer

The Example Scikit-learn Census repository serves as a guide to help you understand how to deploy a SHAP explainer and use explainability visualizations to enhance model explainability. The repository contains a scikit-learn model paired with a SHAP kernel explainer. In this example, a k-nearest neighbors (KNN) classifier is trained on the widely-used Adult (Census-Income) dataset from the UCI Machine Learning Repository.

Alibi explainer

The Example Scikit-learn Alibi Tabular repository provides a practical guide for deploying Anchor explainers to enhance the interpretability of machine learning models. The repository contains highlights a scikit-learn model integrated with a tabular anchor explainer from the Alibi open-source library. In this example, a k-nearest neighbors (KNN) classifier is trained on the widely-used Adult (Census-Income) dataset from the UCI Machine Learning Repository.

Integrated explainer

The Example Pytorch Age and Gender Classification with Integrated Explainer repository helps you understand how to deploy a model with an integrated explainer. It includes a PyTorch model paired with a Captum saliency explainer. This repository builds on a deep learning project designed to estimate age and predict gender using the UTKFace dataset from Kaggle, with MTCNN (Multi-task Cascaded Convolutional Networks) employed for face detection.

Feature examples

Job schedules

The Example Weather Prediction repository contains an example of how to deploy a model and transformer that supports scheduled requests. The repository contains a LightGBM model that predicts the temperature in 24H.

Feature drift monitoring

The Example Scikit-learn Census repository metadata file contains an example a baseline data distribution as required for feature drift monitoring. For more information about the repostitory see the SHAP explainer example.

General Examples

Age & Gender Classification

The Example Pytorch Agenet repository provides a practical example of deploying pre-built PyTorch images using Deeploy. It includes a PyTorch model along with a custom Captum occlusion explainer. This implementation is based on the Age and Gender Classification model by Gil Levi and Tal Hassner, adapted for PyTorch from the original repository.

Fraud detection

The Example Fraud Detection repository features a Fraud Detection Model built with a scikit-learn Gaussian Naive Bayes classifier, a MACE tabular explainer, and a TabularTransform OmniXAI transformer, all deployed using a custom Docker image.

Diabetes re-admission

The Diabetes Readmission Prediction repository includes an XGBoost model designed to predict whether a diabetes patient will be readmitted to the hospital. It utilizes an open dataset from the years 1999-2008, containing 101,766 records.