Monitor and explain a ML model that classifies natural images to object labels.
obzai
package if you haven’t already installed it. Also let’s install gdown
to download pretrained weights.
ObzClient
from our Python library, you will need your unique API key. This key is required to securely connect your code to your account on our SaaS platform.
Here’s how to find your API key:
torch.nn.Linear
) onto a DINO backbone.
ObzClient
to automatically log your data features and model explanation outputs to the Obz AI cloud platform.
Data Inspector
Module for outlier detection:
XAI Tool
Module:
ObzClient
for a cloud loggingOutlierDetector
instance and XAITool
instances, you are ready to wrap it into your ObzClient
!ObzClient
.login()
method in your Python code.
.netrc
file on your computer. This means you do not have to enter your API key again when using the ObzClient
, authentication will happen automatically in future sessions.
Now let’s initialize a project with .init_project()
method. This method accepts following arguments:
project_name
(str, required): the name of the project you want to work with.
ml_task
(str, required): the type of machine learning task you are working on. We will use multiclass_classification
in this tutorial.
index2name
(dict, optional): A dictionary mapping numeric class indices to human-readable class names.
.log_reference()
method on your client object. It will automatically send all reference data from your Outlier Detector into your Dashboard.
ObzClient
initiated with an outlier detector and an XAI tool, we are ready to .run_and_log
, processing batches of samples in the inference data.