Skip to content

Python SDK Resources and References

TruEra's Python SDK is a library of developer tools and methods designed to facilitate integration of your models with the TruEra AI Quality Platform.

So, if Python is your project's primary programming language, TruEra's Python SDK adds the standard and customizable TruEra functionality you need without impelling your developers to "reinvent the wheel."

Providing a rich library of tools and functions — from creating and ingesting new projects, models and data to analyzing and testing your model's performance and results — the Python SDK helps you automate the point-and-click functionality of the TruEra Web App within your own AI/ML framework.

Hence, once installed, you can use the SDK more broadly to:

  • Set up your TruEra workspace and create projects
  • Ingest models and data into TruEra projects
  • Explain model behavior using robust analytical tools for targeted improvements
  • Test and evaluate your models in terms of performance, fairness, stability, and feature importance.

First, use the SDK to set up your workspace environment to be either remote or local.

Local vs. Remote Workspaces

The difference is that with a remote workspace, you'll direcly ingest models and data into your TruEra deployment; whereas with a local workspace, your TruEra projects will run on your local machine, allowing you to carry out basic analysis without the overhead of ingesting models and data to a remote deployment.

Regardless of the environment you choose, once you've created your workspace and at least one project, among the SDK's most useful modules are its IngestionClient and Explainer.

Ingesting Data and Models

Prioritizing your data sources is an important first step — specifying the location of the source and enabling TruEra's secure access to it.

General ingestion methods and techniques for data and models, respectively, can be found in Data Ingestion and Model Ingestion. More advanced real-time and batch data ingestion methods are discussed in Ingesting Data and Models.

Explaining Model Behavior

Model explainability refers to the concept of being able to understand and interpret the results of a given machine learning model.

Explainers treat models as blackboxes by default and can generate insights into feature influences without accessing the internal workings of the model. For select models, like tree and linear ones, TruEra also supports optimizations to more quickly and efficiently generate feature influences. For more on explainability, see Explaining Model Behavior.