Databricks Integration
Fiddler allows your team to monitor, explain and analyze your models developed and deployed in Databricks Workspace by integrating with MLFlow for model asset management and utilizing Databricks Spark environment for data management.
To validate and monitor models built on Databricks using Fiddler, you can follow these steps:
Batch Models
Live Models
Creating a Fiddler Project
Launch a Databricks notebook from your workspace and run the following code:
Now that you have the Fiddler library installed, you can connect to your Fiddler environment. Please use the UI administration guide to help you find your Fiddler credentials.
Finally, you can set up a new project using:
Uploading a Baseline Dataset
You can grab your baseline dataset from a delta table and share it with Fiddler as a baseline dataset:
Adding Model Information
Using the **MLFlow API ** you can query the model registry and get the model signature which describes the inputs and outputs as a dictionary. You can use this dictionary to build out the ModelInfo object required to the model to Fiddler:
Now you can use the model signature to build the Fiddler ModelInfo object :
Uploading Model Files
Sharing your model artifacts helps Fiddler explain your models. By leveraging the MLFlow API you can download these model files:
Once you have the model file, you can create a package.py file in this model directory that describes how to access this model.
Finally, you can upload all the model artifacts to Fiddler:
Alternatively, you can skip uploading your model and use Fiddler to generate a surrogate model to get low-fidelity explanations for your model.
Publishing Events
Now you can publish all the events from your models. You can do this in two ways:
Batch Models
If your models run batch processes with your models or your aggregate model outputs over a timeframe, then you can use the table change feed from Databricks to select only the new events and send them to Fiddler:
Live Models
For models with live predictions or real-time applications, you can add the following code snippet to your prediction pipeline and send every event to Fiddler in real-time:
Support for Inference tables and hosted endpoints is coming soon!
Last updated