Skip to content

Commit aa09116

Browse files
authored
[CI] Add missing dependencies for notebooks in Azure pipeline steps (giotto-ai#643)
* Install nbformat in wheel testing step for manylinux2014 jobs * Ensure X is returned as a numpy array in MNIST_classification notebook * Use Python 3.7-compatible f-strings * [CI] Install umap-learn and gensim in notebooks step
1 parent 9efb692 commit aa09116

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
- script: |
7171
set -e
7272
python -m pip install pandas pytest pytest-cov pytest-azurepipelines pytest-benchmark hypothesis
73+
# nbformat is needed by plotly: https://github.com/plotly/plotly.py/issues/2159
74+
python -m pip install nbformat
7375
mkdir tmp_test_cov
7476
cd tmp_test_cov
7577
pytest --pyargs gtda --ignore-glob='*externals*' --no-cov --no-coverage-upload
@@ -78,7 +80,7 @@ jobs:
7880

7981
- script: |
8082
set -e
81-
python -m pip install openml matplotlib
83+
python -m pip install openml matplotlib umap-learn gensim
8284
python -m pip install papermill
8385
cd examples
8486
for n in *.ipynb

examples/MNIST_classification.ipynb

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"source": [
4747
"from sklearn.datasets import fetch_openml\n",
4848
"\n",
49-
"X, y = fetch_openml(\"mnist_784\", version=1, return_X_y=True)"
49+
"X, y = fetch_openml(\"mnist_784\", version=1, return_X_y=True, as_frame=False)"
5050
]
5151
},
5252
{
@@ -614,21 +614,9 @@
614614
],
615615
"metadata": {
616616
"kernelspec": {
617-
"display_name": "Python 3",
617+
"display_name": "Python 3 (ipykernel)",
618618
"language": "python",
619619
"name": "python3"
620-
},
621-
"language_info": {
622-
"codemirror_mode": {
623-
"name": "ipython",
624-
"version": 3
625-
},
626-
"file_extension": ".py",
627-
"mimetype": "text/x-python",
628-
"name": "python",
629-
"nbconvert_exporter": "python",
630-
"pygments_lexer": "ipython3",
631-
"version": "3.8.5"
632620
}
633621
},
634622
"nbformat": 4,

examples/local_hom_NLP_disambiguation.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@
171171
"outputs": [],
172172
"source": [
173173
"print(f\"\"\"Example of a preprocessed sentence where 'note' is used as a verb:\n",
174-
"{refined_list[0] = }\n",
174+
"refined_list[0] = {refined_list[0]}\n",
175175
"\n",
176176
"Example of preprocessed sentence where 'note' refers to music:\n",
177-
"{refined_list[1] = }\"\"\")"
177+
"refined_list[1] = {refined_list[1]}\"\"\")"
178178
]
179179
},
180180
{

0 commit comments

Comments
 (0)