diff --git a/doc/source/examples/trustscore_mnist.ipynb b/doc/source/examples/trustscore_mnist.ipynb index 8caf4d2d8..bfb027175 100644 --- a/doc/source/examples/trustscore_mnist.ipynb +++ b/doc/source/examples/trustscore_mnist.ipynb @@ -546,7 +546,7 @@ ], "source": [ "plt.figure(figsize=(20, 4))\n", - "for i in range(n):\n", + "for i in range(min(n, len(idx_low))): # in case fewer than n instances are found\n", " ax = plt.subplot(1, n, i+1)\n", " plt.imshow(imgs_low[i].reshape(28, 28))\n", " plt.title('Model prediction: {} (p={:.2f}) \\n Label: {} \\n Trust score: {:.3f}' \\\n", @@ -782,7 +782,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -796,7 +796,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/testing/test_notebooks.py b/testing/test_notebooks.py index 1cc4f9da4..e0452deba 100644 --- a/testing/test_notebooks.py +++ b/testing/test_notebooks.py @@ -39,6 +39,9 @@ if platform.system() == 'Windows': EXCLUDE_NOTEBOOKS.add('protoselect_adult_cifar10.ipynb') # Exclude on Windows due to the use of wget EXCLUDE_NOTEBOOKS.add('similarity_explanations_20ng.ipynb') # times out, likely due to the EmbeddingModel being slow + EXCLUDE_NOTEBOOKS.add('trustscore_mnist.ipynb') # times out +if platform.system() == 'Darwin': + EXCLUDE_NOTEBOOKS.add('trustscore_mnist.ipynb') # times out EXECUTE_NOTEBOOKS = ALL_NOTEBOOKS - EXCLUDE_NOTEBOOKS @pytest.mark.timeout(600)