Skip to content

Commit e684028

Browse files
Add a cell using the model test to the example notebook
1 parent baa093e commit e684028

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

example/bioimageio-core-usage.ipynb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,22 @@
137137
" print(\"Output with axes:\", out.axes, \"and shape\", out.shape)"
138138
]
139139
},
140+
{
141+
"cell_type": "code",
142+
"execution_count": null,
143+
"id": "b5f21529",
144+
"metadata": {},
145+
"outputs": [],
146+
"source": [
147+
"from bioimageio.core.resource_tests import test_model\n",
148+
"test_result = test_model(model_resource)\n",
149+
"if test_result[\"error\"]:\n",
150+
" print(\"The model test failed with:\", test_result[\"error\"])\n",
151+
" print(\"with the traceback:\", test_result[\"traceback\"])\n",
152+
"else:\n",
153+
" print(\"The model passed all tests\")"
154+
]
155+
},
140156
{
141157
"cell_type": "markdown",
142158
"id": "34c75014",

0 commit comments

Comments
 (0)