Skip to content

Commit 2b547e6

Browse files
authored
fix nbs again (#158)
1 parent 9355954 commit 2b547e6

File tree

4 files changed

+73
-25
lines changed

4 files changed

+73
-25
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ jobs:
178178
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 1000/g' \
179179
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
180180
181-
jupyter execute examples/mlir_python_extras.ipynb --output=mlir_python_extras_output
182-
cat examples/mlir_python_extras_output.ipynb | jq '.cells[].outputs | select(length > 0) | .[0] | .text'
181+
jupyter execute examples/mlir_python_extras.ipynb --output=mlir_python_extras_output || true
182+
cat examples/mlir_python_extras_output.ipynb
183183
jupyter execute examples/vectorization_e2e.ipynb --output=vectorization_e2e_output
184184
cat examples/vectorization_e2e_output.ipynb | jq '.cells[].outputs | select(length > 0) | .[0] | .text'
185185
if [ ${{ matrix.os }} == 'ubuntu-22.04' ]; then

examples/cuda_e2e.ipynb

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,50 @@
3434
"source": [
3535
"import os\n",
3636
"BRANCH = os.getenv(\"BRANCH\", \"main\")\n",
37+
"os.environ[\"BRANCH\"] = BRANCH\n",
3738
"os.environ[\"SCRIPT_ADDRESS\"] = f\"https://raw.githubusercontent.com/makslevental/mlir-python-extras/refs/heads/{BRANCH}/scripts/get_latest_bindings.py\""
3839
],
3940
"metadata": {
4041
"colab": {
4142
"base_uri": "https://localhost:8080/"
4243
},
4344
"id": "Xh-QUDWiX-FD",
44-
"outputId": "6865a63a-daa4-4610-e33a-721d37c0211f"
45+
"outputId": "6865a63a-daa4-4610-e33a-721d37c0211f",
46+
"ExecuteTime": {
47+
"end_time": "2025-05-20T20:34:42.466337Z",
48+
"start_time": "2025-05-20T20:34:42.464352Z"
49+
}
4550
},
4651
"outputs": [],
47-
"execution_count": null
52+
"execution_count": 3
4853
},
4954
{
50-
"metadata": {},
55+
"metadata": {
56+
"ExecuteTime": {
57+
"end_time": "2025-05-20T20:34:49.667778Z",
58+
"start_time": "2025-05-20T20:34:43.565625Z"
59+
}
60+
},
5161
"cell_type": "code",
52-
"outputs": [],
53-
"execution_count": null,
5462
"source": [
5563
"%%bash\n",
5664
"curl $SCRIPT_ADDRESS -o get_latest_bindings.py\n",
57-
"latest_cuda_version=$(python get_latest_bindings.py \"cuda\") && pip install -q mlir_python_bindings==$latest_cuda_version -f https://makslevental.github.io/wheels\n",
65+
"latest_cuda_version=$(python get_latest_bindings.py \"cuda\")\n",
66+
"pip install -q mlir_python_bindings==$latest_cuda_version -f https://makslevental.github.io/wheels\n",
5867
"pip install -q git+https://github.com/makslevental/mlir-python-extras@$BRANCH"
59-
]
68+
],
69+
"outputs": [
70+
{
71+
"name": "stderr",
72+
"output_type": "stream",
73+
"text": [
74+
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
75+
" Dload Upload Total Spent Left Speed\n",
76+
"100 2421 100 2421 0 0 36455 0 --:--:-- --:--:-- --:--:-- 36681\n"
77+
]
78+
}
79+
],
80+
"execution_count": 4
6081
},
6182
{
6283
"cell_type": "markdown",
@@ -94,10 +115,14 @@
94115
"assert CUDA_RUNTIME_LIB_PATH.exists()"
95116
],
96117
"metadata": {
97-
"id": "_R-_0M5ZYO8p"
118+
"id": "_R-_0M5ZYO8p",
119+
"ExecuteTime": {
120+
"end_time": "2025-05-20T20:34:54.377581Z",
121+
"start_time": "2025-05-20T20:34:54.374777Z"
122+
}
98123
},
99124
"outputs": [],
100-
"execution_count": null
125+
"execution_count": 6
101126
},
102127
{
103128
"cell_type": "markdown",

examples/mlir_python_extras.ipynb

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,41 @@
1212
]
1313
},
1414
{
15-
"metadata": {},
15+
"metadata": {
16+
"ExecuteTime": {
17+
"end_time": "2025-05-20T20:40:47.920410Z",
18+
"start_time": "2025-05-20T20:40:47.918278Z"
19+
}
20+
},
1621
"cell_type": "code",
17-
"outputs": [],
18-
"execution_count": null,
1922
"source": [
2023
"# if running by yourself, you can use this instead\n",
2124
"# !pip install -q mlir-python-extras -f https://makslevental.github.io/wheels\n",
2225
"import os\n",
2326
"BRANCH = os.getenv(\"BRANCH\", \"main\")\n",
27+
"os.environ[\"BRANCH\"] = BRANCH\n",
2428
"os.environ[\"SCRIPT_ADDRESS\"] = f\"https://raw.githubusercontent.com/makslevental/mlir-python-extras/refs/heads/{BRANCH}/scripts/get_latest_bindings.py\""
25-
]
29+
],
30+
"outputs": [],
31+
"execution_count": 3
2632
},
2733
{
28-
"metadata": {},
34+
"metadata": {
35+
"ExecuteTime": {
36+
"end_time": "2025-05-20T20:42:06.789887Z",
37+
"start_time": "2025-05-20T20:42:00.996805Z"
38+
}
39+
},
2940
"cell_type": "code",
30-
"outputs": [],
31-
"execution_count": null,
3241
"source": [
3342
"%%bash\n",
3443
"curl $SCRIPT_ADDRESS -o get_latest_bindings.py\n",
35-
"latest_version=$(python get_latest_bindings.py \"none\") && pip install -q mlir_python_bindings==$latest_version -f https://makslevental.github.io/wheels\n",
36-
"pip install -q git+https://github.com/makslevental/mlir-python-extras@$BRANCH"
37-
]
44+
"latest_version=$(python get_latest_bindings.py \"none\")\n",
45+
"pip install mlir_python_bindings==$latest_version -f https://makslevental.github.io/wheels\n",
46+
"pip install git+https://github.com/makslevental/mlir-python-extras@$BRANCH"
47+
],
48+
"outputs": [],
49+
"execution_count": 12
3850
},
3951
{
4052
"metadata": {},

examples/vectorization_e2e.ipynb

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,25 @@
3939
"# !pip install -q mlir-python-extras -f https://makslevental.github.io/wheels\n",
4040
"import os\n",
4141
"BRANCH = os.getenv(\"BRANCH\", \"main\")\n",
42-
"os.environ[\"SCRIPT_ADDRESS\"] = f\"https://raw.githubusercontent.com/makslevental/mlir-python-extras/refs/heads/{BRANCH}/scripts/get_latest_bindings.py\"\n",
43-
"!curl $SCRIPT_ADDRESS -o get_latest_bindings.py\n",
44-
"!latest_version=$(python get_latest_bindings.py \"none\") && pip install -q mlir_python_bindings==$latest_version -f https://makslevental.github.io/wheels\n",
45-
"!pip install -q git+https://github.com/makslevental/mlir-python-extras@$BRANCH\n"
42+
"os.environ[\"BRANCH\"] = BRANCH\n",
43+
"os.environ[\"SCRIPT_ADDRESS\"] = f\"https://raw.githubusercontent.com/makslevental/mlir-python-extras/refs/heads/{BRANCH}/scripts/get_latest_bindings.py\""
4644
],
4745
"outputs": [],
4846
"execution_count": null
4947
},
48+
{
49+
"metadata": {},
50+
"cell_type": "code",
51+
"outputs": [],
52+
"execution_count": null,
53+
"source": [
54+
"%%bash\n",
55+
"curl $SCRIPT_ADDRESS -o get_latest_bindings.py\n",
56+
"latest_cuda_version=$(python get_latest_bindings.py \"none\")\n",
57+
"pip install -q mlir_python_bindings==$latest_cuda_version -f https://makslevental.github.io/wheels\n",
58+
"pip install -q git+https://github.com/makslevental/mlir-python-extras@$BRANCH"
59+
]
60+
},
5061
{
5162
"metadata": {},
5263
"cell_type": "markdown",

0 commit comments

Comments
 (0)