Skip to content

Commit e09fb8f

Browse files
authored
Add export labels example
1 parent cdc42c8 commit e09fb8f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

examples/model_diagnostics/model_diagnostics_demo.ipynb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,30 @@
616616
" break\n",
617617
" print(model_run_data_row.url)"
618618
]
619+
},
620+
{
621+
"cell_type": "markdown",
622+
"id": "a41f9f33",
623+
"metadata": {},
624+
"source": [
625+
"### Export model run labels"
626+
]
627+
},
628+
{
629+
"cell_type": "code",
630+
"execution_count": null,
631+
"id": "4573e2c7",
632+
"metadata": {},
633+
"outputs": [],
634+
"source": [
635+
"MODEL_ID = ''\n",
636+
"MODEL_RUN_ID = ''\n",
637+
"model = client.get_model(MODEL_ID)\n",
638+
"\n",
639+
"def is_correct_model_run(run): return run[\"id\"] == MODEL_RUN_ID\n",
640+
"model_run = next(filter(is_correct_model_run, model.model_runs), None)\n",
641+
"labels = model_run.export_labels(download=True)"
642+
]
619643
}
620644
],
621645
"metadata": {

0 commit comments

Comments
 (0)