Overview
Aporia monitors your models by connecting directly to your data. If you don't store your predictions yet, see our guide on Storing Your Predictions (recommended), or just log them directly to Aporia.
Aporia currently supports the following data sources:
Amazon S3
BigQuery
Redshift
Athena
Snowflake
PostgreSQL
Delta Lake
Glue Data Catalog
If your storage or database are not shown here, please contact your Aporia account manager for further assistance.
Configure Data Source
Connecting to a data source begins with configuring its connection details. For example, to connect to a Postgres database, we can create the following data source object:
Please refer to the documentation page of the relevant data source for a complete list of supported parameters and configuration options.
Connect Serving Data
After creating a data source, we can create a model version and connect it to the data source. For example:
By default, each raw input, feature, and prediction is mapped to the same column in the PostgreSQL query.
As part of the connect serving
API, you must specify the following two additional columns:
id_column
- A unique ID to represent this prediction.timestamp_column
- A column representing when did this prediction occur.
Integrating Delayed Actuals
Integrating actuals can be done by using the labels
argument of the connect_serving
API. To use it, each Aporia prediction can be mapped to a column representing its actual value.
For example, let's assume we have two columns - will_buy_insurance
(which is the model prediction), and did_buy_insurance
(the ground truth). To integrate it to Aporia:
The ground truth can be NULL
until it actually has value, and that's okay.
Connecting Training / Test Sets
To connect your model version to training or test sets, you can use the connect_training
and connect_testing
APIs.
For example:
Advanced Mapping
Any column that has the same name as a raw input, feature, or prediction in the model schema is mapped to the corresponding raw input, feature, or prediction.
However, you can override this mapping using the raw_inputs
, features
, predictions
, and labels
arguments to the connect_serving
/ connect_training
/ connect_testing
APIs. Example:
Last updated