Querying metrics
To query metrics from Aporia, initialize a new client and call the query_metrics
API:
Parameters
The query_metrics
API has the following parameters:
Parameter | Type | Description |
---|---|---|
model_id |
| Model ID to query metrics for. |
metrics |
| List of metrics to query. |
The API can request values for multiple metrics concurrently.
MetricParameters
Here are different fields for the MetricParameters
object:
Field | Type | Description |
---|---|---|
name |
| |
dataset |
| Specifies what data to query (training / serving), what segment, and what timeframe. Required. |
column |
| Name of the column to calculate the metric for.
Required except for the |
k |
| K value for ranking metrics such as nDCG.
Required only for |
threshold |
| Threshold to use when calculating binary performance metrics. Required only if the prediction is |
custom_metric_id |
| Custom metric ID. Required only if you want to query a custom metric. |
baseline |
| Specifies what data to use as baseline. Required only for statistical distances such as |
MetricDataset
The MetricDataset
object contains the following fields:
Field | Type | Description |
---|---|---|
dataset_type |
| Can be either |
time_range |
| Time range (contains |
model_version |
| Model version to filter by. Optional. |
segment |
| Used to query metrics in a specific data segment. Contains |
Last updated