Skip to content

Commit

Permalink
Update for dataset metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Christine Draper committed Nov 13, 2024
1 parent a01158a commit 932a52a
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions examples/example_notebooks/Metrics API.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@
]
},
{
"cell_type": "raw",
"id": "8371952d-2ac4-485a-a4a9-f01ca840028e",
"cell_type": "markdown",
"id": "b1404ddd",
"metadata": {},
"source": [
"## Using the WhyLabs client\n",
Expand Down Expand Up @@ -435,6 +435,41 @@
"))\n",
"results"
]
},
{
"cell_type": "markdown",
"id": "2e13b1f7",
"metadata": {},
"source": [
"Get anomaly_count for a monitor targeted at the dataset level. In this case, a column name of `__internal__.datasetMetrics` is used."
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "5cfe22c4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'data': []}"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results = data_api.metric_timeseries_data(org_id, dataset_id, MetricTimeseriesRequest(\n",
" interval = \"2024-11-01T00:00:00Z/P1D\",\n",
" column = \"__internal__.datasetMetrics\",\n",
" metric = \"anomaly_count\",\n",
" monitor_id = \"breakable-salmon-ferret-9291\",\n",
"))\n",
"results"
]
}
],
"metadata": {
Expand Down

0 comments on commit 932a52a

Please sign in to comment.