From 1f71074b8821e1b5bdf925c72ddf1bcd230ead0b Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Fri, 10 Jan 2025 11:04:08 -0800 Subject: [PATCH 1/3] Switch workflows to use new requirements-iree-unpinned.txt file. --- .github/workflows/ci-llama-large-tests.yaml | 16 ++++------ .github/workflows/ci-sglang-benchmark.yml | 13 +++------ .../workflows/ci-sglang-integration-tests.yml | 9 ++---- .github/workflows/ci-tuner.yml | 5 +--- .github/workflows/ci_eval.yaml | 29 +++++++------------ 5 files changed, 23 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index 14e14461c..aaac941f2 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -55,18 +55,12 @@ jobs: python -m pip install --no-compile --upgrade pip # Note: We install in three steps in order to satisfy requirements - # from non default locations first. Installing the PyTorch CPU - # wheels saves multiple minutes and a lot of bandwidth on runner setup. + # from non default locations first. pip install --no-compile -r pytorch-cpu-requirements.txt - - # Install nightly IREE packages. - # We could also pin to a known working or stable version. - pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \ - iree-base-compiler \ - iree-base-runtime \ - iree-turbine - - pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/ + pip install -r requirements-iree-unpinned.txt + pip install --no-compile \ + -r sharktank/requirements-tests.txt \ + -e sharktank/ pip freeze diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 3af1ad725..aba53caa6 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -61,18 +61,13 @@ jobs: run: | source ${VENV_DIR}/bin/activate python -m pip install --no-compile --upgrade pip + # Note: We install in three steps in order to satisfy requirements - # from non default locations first. Installing the PyTorch CPU - # wheels saves multiple minutes and a lot of bandwidth on runner setup. + # from non default locations first. pip install --no-compile -r pytorch-cpu-requirements.txt - pip install -f https://iree.dev/pip-release-links.html --pre iree-turbine - pip install --no-compile -r requirements.txt -e sharktank/ shortfin/ - # Pin to known-working versions. - pip install -f https://iree.dev/pip-release-links.html \ - iree-base-compiler==3.1.0rc20241220 \ - iree-base-runtime==3.1.0rc20241220 \ - "numpy<2.0" + pip install -r requirements-iree-pinned.txt + pip install --no-compile -r requirements.txt -e sharktank/ shortfin/ # Install SGLang pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index 4eaae8dc4..9c2282cb9 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -52,17 +52,12 @@ jobs: python -m pip install --no-compile --upgrade pip # Note: We install in three steps in order to satisfy requirements - # from non default locations first. Installing the PyTorch CPU - # wheels saves multiple minutes and a lot of bandwidth on runner setup. + # from non default locations first. pip install --no-compile -r pytorch-cpu-requirements.txt # Use newest possible releases to be able to track commits that may # cause errors. - pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \ - iree-base-compiler \ - iree-base-runtime \ - iree-turbine \ - "numpy<2.0" + pip install -r requirements-iree-unpinned.txt pip install --no-compile -r requirements.txt -e sharktank/ shortfin/ diff --git a/.github/workflows/ci-tuner.yml b/.github/workflows/ci-tuner.yml index 64bbc9a57..6d071cb8f 100644 --- a/.github/workflows/ci-tuner.yml +++ b/.github/workflows/ci-tuner.yml @@ -46,10 +46,7 @@ jobs: - name: Install tuner dependencies run: | pip install -r tuner/requirements-tuner.txt - python -m pip install \ - --find-links https://iree.dev/pip-release-links.html \ - --upgrade --pre \ - iree-base-compiler iree-base-runtime + pip install -r requirements-iree-unpinned.txt - name: Run tuner tests run: pytest tuner/ diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index fe29f54d5..4092692a8 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -53,18 +53,13 @@ jobs: python -m pip install --no-compile --upgrade pip # Note: We install in three steps in order to satisfy requirements - # from non default locations first. Installing the PyTorch CPU - # wheels saves multiple minutes and a lot of bandwidth on runner setup. + # from non default locations first. pip install --no-compile -r pytorch-cpu-requirements.txt + pip install -r requirements-iree-unpinned.txt + pip install --no-compile \ + -r sharktank/requirements-tests.txt \ + -e sharktank/ - # Install nightly IREE packages. - # We could also pin to a known working or stable version. - pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \ - iree-base-compiler \ - iree-base-runtime \ - iree-turbine - - pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/ pip freeze - name: Run perplexity test with IREE @@ -112,16 +107,14 @@ jobs: python -m pip install --no-compile --upgrade pip # Note: We install in three steps in order to satisfy requirements - # from non default locations first. Installing the PyTorch CPU - # wheels saves multiple minutes and a lot of bandwidth on runner setup. + # from non default locations first. pip install --no-compile -r pytorch-cpu-requirements.txt + pip install -r requirements-iree-unpinned.txt + pip install --no-compile \ + -r sharktank/requirements-tests.txt \ + -e sharktank/ - # Install nightly iree-turbine. - # We could also pin to a known working or stable version. - pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \ - iree-turbine - - pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/ + pip freeze - name: Run perplexity test with Torch run: | From ca5f053ba6c1f05d53e454668309c9bb6b6a023c Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 13 Jan 2025 10:41:26 -0800 Subject: [PATCH 2/3] Don't use root requirements.txt. --- .github/workflows/ci-sglang-benchmark.yml | 5 ++++- .github/workflows/ci-sglang-integration-tests.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index aba53caa6..bb3e7ced9 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -67,7 +67,10 @@ jobs: pip install --no-compile -r pytorch-cpu-requirements.txt # Pin to known-working versions. pip install -r requirements-iree-pinned.txt - pip install --no-compile -r requirements.txt -e sharktank/ shortfin/ + pip install --no-compile \ + -r sharktank/requirements-tests.txt \ + -r shortfin/requirements-tests.txt \ + -e sharktank/ shortfin/ # Install SGLang pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index 9c2282cb9..5257d71eb 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -59,7 +59,10 @@ jobs: # cause errors. pip install -r requirements-iree-unpinned.txt - pip install --no-compile -r requirements.txt -e sharktank/ shortfin/ + pip install --no-compile \ + -r sharktank/requirements-tests.txt \ + -r shortfin/requirements-tests.txt \ + -e sharktank/ shortfin/ # Install SGLang and sentence_transformers pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" From 4552d082da5380c33d72d0883d75dc496d6ed7b0 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 13 Jan 2025 10:42:17 -0800 Subject: [PATCH 3/3] Unpin requirements in ci-sglang-benchmark.yml. --- .github/workflows/ci-sglang-benchmark.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index bb3e7ced9..2f4b7d130 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -65,8 +65,11 @@ jobs: # Note: We install in three steps in order to satisfy requirements # from non default locations first. pip install --no-compile -r pytorch-cpu-requirements.txt - # Pin to known-working versions. - pip install -r requirements-iree-pinned.txt + + # Use newest possible releases to be able to track commits that may + # cause errors or performance changes. + pip install -r requirements-iree-unpinned.txt + pip install --no-compile \ -r sharktank/requirements-tests.txt \ -r shortfin/requirements-tests.txt \