Skip to content

Commit c27c90c

Browse files
authored
Add --pre flag to pip installs for using nightly versions. (#19145)
Progress on #18938. Pip will only install "pre-release" versions if `--pre` is set or the version is set explicitly: https://pip.pypa.io/en/stable/cli/pip_install/#pre-release-versions. The `rc` part of our `rcYYYYMMDD` suffix used in the nightly packages is considered a "Pre-release segment" in the version string: https://packaging.python.org/en/latest/specifications/version-specifiers/#public-version-identifiers. Also switched sample Colab notebooks to use the new package names. I tested these lightly, but did not fully regenerate them, so the embedded logs still reference old versions of packages: * Manually ran a few notebooks from my branch like https://colab.research.google.com/github/ScottTodd/iree/blob/release-pre/samples/colab/tensorflow_edge_detection.ipynb * Ran the 'samples' workflow on my fork: https://github.com/ScottTodd/iree/actions/runs/11828250281
1 parent eef2c3a commit c27c90c

18 files changed

+30
-24
lines changed

.github/workflows/samples.yml

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
python3 -m pip install \
8787
--find-links https://iree.dev/pip-release-links.html \
8888
--upgrade \
89+
--pre \
8990
iree-base-compiler \
9091
iree-base-runtime
9192
- name: "Setup emsdk"

docs/website/docs/developers/debugging/integration-tests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ All steps here assume starting from the IREE root directory.
7171
Install distributed packages
7272
7373
```bash
74-
# Install packages from nightly releases
74+
# Install packages from nightly pre-releases
7575
# This should work for most cases, as the importers change infrequently
76-
python -m pip install \
76+
python -m pip install --pre \
7777
iree-base-compiler iree-base-runtime iree-tools-tf iree-tools-tflite \
7878
--find-links https://iree.dev/pip-release-links.html
7979
```

docs/website/docs/guides/deployment-configurations/snippets/_iree-compiler-from-release.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
=== ":material-alert: Nightly releases"
1111

12-
Nightly releases are published on
12+
Nightly pre-releases are published on
1313
[GitHub releases](https://github.com/iree-org/iree/releases).
1414

1515
``` shell
1616
python -m pip install \
1717
--find-links https://iree.dev/pip-release-links.html \
18-
--upgrade iree-base-compiler
18+
--upgrade --pre iree-base-compiler
1919
```
2020

2121
!!! tip

docs/website/docs/guides/deployment-configurations/snippets/_iree-runtime-from-release.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
=== ":material-alert: Nightly releases"
1111

12-
Nightly releases are published on
12+
Nightly pre-releases are published on
1313
[GitHub releases](https://github.com/iree-org/iree/releases).
1414

1515
``` shell
1616
python -m pip install \
1717
--find-links https://iree.dev/pip-release-links.html \
18-
--upgrade iree-base-runtime
18+
--upgrade --pre iree-base-runtime
1919
```

docs/website/docs/guides/ml-frameworks/onnx.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ graph LR
7070

7171
=== ":material-alert: Nightly releases"
7272

73-
Nightly releases are published on
73+
Nightly pre-releases are published on
7474
[GitHub releases](https://github.com/iree-org/iree/releases).
7575

7676
``` shell
7777
python -m pip install \
7878
--find-links https://iree.dev/pip-release-links.html \
7979
--upgrade \
80+
--pre \
8081
iree-base-compiler[onnx] \
8182
iree-base-runtime
8283
```

docs/website/docs/guides/ml-frameworks/tensorflow.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ graph LR
8080
python -m pip install \
8181
--find-links https://iree.dev/pip-release-links.html \
8282
--upgrade \
83+
--pre \
8384
iree-base-compiler \
8485
iree-base-runtime \
8586
iree-tools-tf

docs/website/docs/guides/ml-frameworks/tflite.md

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ graph LR
7575
python -m pip install \
7676
--find-links https://iree.dev/pip-release-links.html \
7777
--upgrade \
78+
--pre \
7879
iree-base-compiler \
7980
iree-base-runtime \
8081
iree-tools-tflite

docs/website/docs/reference/bindings/python.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ To use IREE's Python bindings, you will first need to install
8383
iree-base-runtime
8484
```
8585

86-
=== ":material-alert: Nightly releases"
86+
=== ":material-alert: Nightly pre-releases"
8787

88-
Nightly releases are published on
88+
Nightly pre-releases are published on
8989
[GitHub releases](https://github.com/iree-org/iree/releases).
9090

9191
``` shell
9292
python -m pip install \
9393
--find-links https://iree.dev/pip-release-links.html \
9494
--upgrade \
95+
--pre \
9596
iree-base-compiler \
9697
iree-base-runtime
9798
```

experimental/web/generate_web_metrics.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ trap "deactivate 2> /dev/null" EXIT
6565
# Skip package installs when you want by commenting this out. Freezing to a
6666
# specific version when iterating on metrics is useful, and fetching is slow.
6767

68-
python -m pip install --upgrade \
68+
python -m pip install --upgrade --pre \
6969
--find-links https://iree.dev/pip-release-links.html \
7070
iree-base-compiler iree-tools-tflite
7171

samples/colab/low_level_invoke_function.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"outputId": "0339165a-a35f-4b46-9cf8-f22adc69a7fe"
6767
},
6868
"source": [
69-
"!python -m pip install iree-compiler iree-runtime -f https://iree.dev/pip-release-links.html"
69+
"!python -m pip install --pre iree-base-compiler iree-base-runtime -f https://iree.dev/pip-release-links.html"
7070
],
7171
"execution_count": 2,
7272
"outputs": [

samples/colab/tensorflow_edge_detection.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"outputId": "b6126fa9-b170-45dc-c0fd-8081e7ab2732"
7979
},
8080
"source": [
81-
"!python -m pip install iree-compiler iree-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
81+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
8282
],
8383
"execution_count": 3,
8484
"outputs": [

samples/colab/tensorflow_hub_import.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
},
7878
"source": [
7979
"%%capture\n",
80-
"!python -m pip install iree-compiler iree-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
80+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
8181
],
8282
"execution_count": 11,
8383
"outputs": []
@@ -510,4 +510,4 @@
510510
]
511511
}
512512
]
513-
}
513+
}

samples/colab/tensorflow_mnist_training.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
},
8484
"source": [
8585
"%%capture\n",
86-
"!python -m pip install iree-compiler iree-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
86+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
8787
],
8888
"execution_count": 21,
8989
"outputs": []
@@ -638,4 +638,4 @@
638638
]
639639
}
640640
]
641-
}
641+
}

samples/colab/tensorflow_resnet.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"outputId": "51635ebb-cf05-4b5a-f2ef-a0e3c935d113"
7878
},
7979
"source": [
80-
"!python -m pip install iree-compiler iree-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
80+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
8181
],
8282
"execution_count": 3,
8383
"outputs": [
@@ -352,4 +352,4 @@
352352
]
353353
}
354354
]
355-
}
355+
}

samples/colab/tflite_text_classification.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"source": [
5454
"%%capture\n",
5555
"!python -m pip install --upgrade tensorflow\n",
56-
"!python -m pip install iree-compiler iree-runtime iree-tools-tflite -f https://iree.dev/pip-release-links.html\n",
56+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tflite -f https://iree.dev/pip-release-links.html\n",
5757
"!python -m pip install tflite-runtime-nightly"
5858
]
5959
},
@@ -486,4 +486,4 @@
486486
},
487487
"nbformat": 4,
488488
"nbformat_minor": 0
489-
}
489+
}

samples/dynamic_shapes/tensorflow_dynamic_shapes.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
},
178178
"source": [
179179
"%%capture\n",
180-
"!python -m pip install iree-compiler iree-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
180+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
181181
],
182182
"execution_count": 6,
183183
"outputs": []
@@ -505,4 +505,4 @@
505505
]
506506
}
507507
]
508-
}
508+
}

samples/dynamic_shapes/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ trap "deactivate 2> /dev/null" EXIT
3333
python -m pip install \
3434
--find-links https://iree.dev/pip-release-links.html \
3535
--upgrade \
36+
--pre \
3637
iree-base-compiler
3738

3839
# 3. Compile `dynamic_shapes.mlir` using `iree-compile`.

samples/variables_and_state/variables_and_state.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
},
183183
"source": [
184184
"%%capture\n",
185-
"!python -m pip install iree-compiler iree-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
185+
"!python -m pip install --pre iree-base-compiler iree-base-runtime iree-tools-tf -f https://iree.dev/pip-release-links.html"
186186
],
187187
"execution_count": 6,
188188
"outputs": []
@@ -504,4 +504,4 @@
504504
]
505505
}
506506
]
507-
}
507+
}

0 commit comments

Comments
 (0)