From 039b0e84361fa89ce29827ed0cd4a6fa7298c245 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Tue, 3 Dec 2024 13:55:51 -0800 Subject: [PATCH 1/7] Install python packages into venvs across workflows. --- .github/workflows/ci-llama-large-tests.yaml | 8 +++++-- .github/workflows/ci-llama-quick-tests.yaml | 8 +++++-- .github/workflows/ci-sglang-benchmark.yml | 12 +++++++--- .../workflows/ci-sglang-integration-tests.yml | 16 +++++++++----- .github/workflows/ci-shark-ai.yml | 8 ++++++- .github/workflows/ci_eval.yaml | 22 ++++++++++++++----- .github/workflows/ci_eval_short.yaml | 8 ++++++- 7 files changed, 61 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index c2e96141c..06baf250b 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -45,6 +45,8 @@ jobs: uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -58,6 +60,7 @@ jobs: - name: Install pip deps 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 @@ -69,14 +72,15 @@ jobs: pip install --no-compile -f https://iree.dev/pip-release-links.html --src deps \ -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine" - # Test with nightly releases, not what iree-turbine uses. pip install -f https://iree.dev/pip-release-links.html --upgrade --pre \ iree-base-compiler \ iree-base-runtime - name: Run llama tests - run: pytest sharktank/tests/models/llama/benchmark_amdgpu_test.py -v -s --run-nightly-llama-tests --iree-hip-target=gfx942 --iree-device=hip://7 --html=out/llm/llama/benchmark/index.html + run: | + source ${VENV_DIR}/bin/activate + pytest sharktank/tests/models/llama/benchmark_amdgpu_test.py -v -s --run-nightly-llama-tests --iree-hip-target=gfx942 --iree-device=hip://7 --html=out/llm/llama/benchmark/index.html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 diff --git a/.github/workflows/ci-llama-quick-tests.yaml b/.github/workflows/ci-llama-quick-tests.yaml index 20aa5995d..55c787996 100644 --- a/.github/workflows/ci-llama-quick-tests.yaml +++ b/.github/workflows/ci-llama-quick-tests.yaml @@ -45,6 +45,8 @@ jobs: uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -58,6 +60,7 @@ jobs: - name: Install pip deps 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 @@ -69,14 +72,15 @@ jobs: pip install --no-compile -f https://iree.dev/pip-release-links.html --src deps \ -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine" - # Test with nightly releases, not what iree-turbine uses. pip install -f https://iree.dev/pip-release-links.html --upgrade --pre \ iree-base-compiler \ iree-base-runtime - name: Run llama 8b f16 decomposed test - run: pytest sharktank/tests/models/llama/benchmark_amdgpu_test.py -v -s --iree-hip-target=gfx942 --iree-device=hip://0 --run-quick-llama-test + run: | + source ${VENV_DIR}/bin/activate + pytest sharktank/tests/models/llama/benchmark_amdgpu_test.py -v -s --iree-hip-target=gfx942 --iree-device=hip://0 --run-quick-llama-test - name: Upload llama executable files uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index f44e2772b..02953abe4 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -34,6 +34,7 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + VENV_DIR: ${{ github.workspace }}/venv steps: - name: Get Current Date id: date @@ -44,6 +45,8 @@ jobs: uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -57,6 +60,7 @@ jobs: - name: Install pip deps 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 @@ -74,11 +78,13 @@ jobs: iree-base-runtime==3.0.0rc20241118 \ "numpy<2.0" - - name: Install SGLang - run: pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" + # Install SGLang + pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" - name: Launch Shortfin Server - run: pytest -v app_tests/benchmark_tests/llm/sglang_benchmarks/sglang_benchmark_test.py --log-cli-level=INFO --html=out/llm/sglang/index.html + run: | + source ${VENV_DIR}/bin/activate + pytest -v app_tests/benchmark_tests/llm/sglang_benchmarks/sglang_benchmark_test.py --log-cli-level=INFO --html=out/llm/sglang/index.html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index c61756d78..432b55a41 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -35,6 +35,7 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + VENV_DIR: ${{ github.workspace }}/venv steps: - name: Get Current Date id: date @@ -45,6 +46,8 @@ jobs: uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -58,6 +61,7 @@ jobs: - name: Install pip deps 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 @@ -74,11 +78,11 @@ jobs: iree-base-runtime \ "numpy<2.0" - - name: Install SGLang - run: pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" - - - name: Install sentence_transformers - run: pip install sentence_transformers + # Install SGLang and sentence_transformers + pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" + pip install sentence_transformers - name: Run Integration Tests - run: pytest -v app_tests/integration_tests/llm/sglang --log-cli-level=INFO + run: | + source ${VENV_DIR}/bin/activate + pytest -v app_tests/integration_tests/llm/sglang --log-cli-level=INFO diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index fc85a76a7..2472e8a93 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -34,12 +34,15 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + VENV_DIR: ${{ github.workspace }}/venv steps: - name: "Setting up Python" id: setup_python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -53,6 +56,7 @@ jobs: - name: Install pip deps 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 @@ -72,4 +76,6 @@ jobs: iree-base-runtime - name: Run LLM Integration Tests - run: pytest -v app_tests/integration_tests/llm/shortfin --log-cli-level=INFO + run: | + source ${VENV_DIR}/bin/activate + pytest -v app_tests/integration_tests/llm/shortfin --log-cli-level=INFO diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index 0164b6cdc..0646cd8e6 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -37,12 +37,15 @@ jobs: env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" SHARK_PLATFORM_REPO_ROOT: ${{ github.workspace }} + VENV_DIR: ${{ github.workspace }}/venv steps: - name: "Setting up Python" id: setup_python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -56,6 +59,7 @@ jobs: - name: Install sharktank deps 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 @@ -75,7 +79,9 @@ jobs: iree-base-runtime - name: Run perplexity test with IREE - run: pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --run-nightly-llama-tests --bs=100 --iree-device='hip://7' --iree-hip-target=gfx942 --iree-hal-target-backends=rocm --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json --html=out/llm/llama/perplexity/iree_perplexity/index.html + run: | + source ${VENV_DIR}/bin/activate + pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --run-nightly-llama-tests --bs=100 --iree-device='hip://7' --iree-hip-target=gfx942 --iree-hal-target-backends=rocm --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json --html=out/llm/llama/perplexity/iree_perplexity/index.html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 @@ -100,16 +106,17 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" - SHARK_PLATFORM_REPO_ROOT: ${{ github.workspace }} + VENV_DIR: ${{ github.workspace }}/venv steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: "Setting up Python" id: setup_python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} - - - name: "Checkout Code" - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 @@ -120,6 +127,7 @@ jobs: - name: Install sharktank deps 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 @@ -132,7 +140,9 @@ jobs: -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine" - name: Run perplexity test with Torch - run: pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_torch_test.py --longrun --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json --html=out/llm/llama/perplexity/torch_perplexity/index.html + run: | + source ${VENV_DIR}/bin/activate + pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_torch_test.py --longrun --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json --html=out/llm/llama/perplexity/torch_perplexity/index.html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index 4622f5c57..97b4d230c 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -36,12 +36,15 @@ jobs: env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" SHARK_PLATFORM_REPO_ROOT: ${{ github.workspace }} + VENV_DIR: ${{ github.workspace }}/venv steps: - name: "Setting up Python" id: setup_python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{matrix.version}} + - name: Create Python venv + run: python -m venv ${VENV_DIR} - name: "Checkout Code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -55,6 +58,7 @@ jobs: - name: Install sharktank deps 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 @@ -74,4 +78,6 @@ jobs: iree-base-runtime - name: Run perplexity test with vmfb - run: pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --bs=5 --iree-device='hip://6' --iree-hip-target=gfx942 --iree-hal-target-backends=rocm --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json + run: | + source ${VENV_DIR}/bin/activate + pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --bs=5 --iree-device='hip://6' --iree-hip-target=gfx942 --iree-hal-target-backends=rocm --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json From d16577929b8d36cc8ad72fc2de56ff65f670103b Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Tue, 3 Dec 2024 14:15:09 -0800 Subject: [PATCH 2/7] Rename VENV_DIR from /venv to /.venv. --- .github/workflows/ci-sglang-benchmark.yml | 2 +- .github/workflows/ci-sglang-integration-tests.yml | 2 +- .github/workflows/ci-shark-ai.yml | 2 +- .github/workflows/ci_eval.yaml | 4 ++-- .github/workflows/ci_eval_short.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 02953abe4..16a342b20 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -34,7 +34,7 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" - VENV_DIR: ${{ github.workspace }}/venv + VENV_DIR: ${{ github.workspace }}/.venv steps: - name: Get Current Date id: date diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index 432b55a41..144646d11 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -35,7 +35,7 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" - VENV_DIR: ${{ github.workspace }}/venv + VENV_DIR: ${{ github.workspace }}/.venv steps: - name: Get Current Date id: date diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index 2472e8a93..439fa07f1 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -34,7 +34,7 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" - VENV_DIR: ${{ github.workspace }}/venv + VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Setting up Python" id: setup_python diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index 0646cd8e6..90a63764d 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -37,7 +37,7 @@ jobs: env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" SHARK_PLATFORM_REPO_ROOT: ${{ github.workspace }} - VENV_DIR: ${{ github.workspace }}/venv + VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Setting up Python" id: setup_python @@ -106,7 +106,7 @@ jobs: shell: bash env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" - VENV_DIR: ${{ github.workspace }}/venv + VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index 97b4d230c..74cf64bfa 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -36,7 +36,7 @@ jobs: env: PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" SHARK_PLATFORM_REPO_ROOT: ${{ github.workspace }} - VENV_DIR: ${{ github.workspace }}/venv + VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Setting up Python" id: setup_python From 1cf68b5c2dbab10bfc2d99b92e7def863772c630 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Tue, 3 Dec 2024 15:00:45 -0800 Subject: [PATCH 3/7] Try to cache VENV_DIR directories instead of .pip-cache. --- .github/workflows/ci-llama-large-tests.yaml | 6 ++---- .github/workflows/ci-llama-quick-tests.yaml | 6 ++---- .github/workflows/ci-sglang-benchmark.yml | 6 ++---- .github/workflows/ci-sglang-integration-tests.yml | 6 ++---- .github/workflows/ci-shark-ai.yml | 6 ++---- .github/workflows/ci-sharktank.yml | 3 --- .github/workflows/ci_eval.yaml | 12 ++++-------- .github/workflows/ci_eval_short.yaml | 6 ++---- 8 files changed, 16 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index 06afca45a..966199bfc 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -52,10 +51,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-llama-quick-tests.yaml b/.github/workflows/ci-llama-quick-tests.yaml index 63478ab99..433469fab 100644 --- a/.github/workflows/ci-llama-quick-tests.yaml +++ b/.github/workflows/ci-llama-quick-tests.yaml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -52,10 +51,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 7d9545ffd..2ad88f54f 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Checkout Code" @@ -49,10 +48,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index 04caab6fc..394ca54a2 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -34,7 +34,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Checkout Code" @@ -50,10 +49,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index 11f2df76c..c512bf530 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Checkout Code" @@ -49,10 +48,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-sharktank.yml b/.github/workflows/ci-sharktank.yml index 1a179322a..0d9e5d851 100644 --- a/.github/workflows/ci-sharktank.yml +++ b/.github/workflows/ci-sharktank.yml @@ -46,7 +46,6 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: path: ${{ env.PIP_CACHE_DIR }} key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} @@ -98,7 +97,6 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: path: ${{ env.PIP_CACHE_DIR }} key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} @@ -148,7 +146,6 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: path: ${{ env.PIP_CACHE_DIR }} key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index 1f0c0b3a9..ad63b54c7 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -35,7 +35,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -50,10 +49,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} - name: Install sharktank deps run: | @@ -103,7 +101,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -118,10 +115,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install sharktank deps run: | diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index f0a3d75fd..114632f6d 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -34,7 +34,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -49,10 +48,9 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} + path: ${{ env.VENV_DIR }} + key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} - name: Install sharktank deps run: | From f85053cdec4f138cc6aee471f42f9c8d4522573b Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Tue, 3 Dec 2024 15:54:00 -0800 Subject: [PATCH 4/7] Revert "Try to cache VENV_DIR directories instead of .pip-cache." This reverts commit 1cf68b5c2dbab10bfc2d99b92e7def863772c630. --- .github/workflows/ci-llama-large-tests.yaml | 6 ++++-- .github/workflows/ci-llama-quick-tests.yaml | 6 ++++-- .github/workflows/ci-sglang-benchmark.yml | 6 ++++-- .github/workflows/ci-sglang-integration-tests.yml | 6 ++++-- .github/workflows/ci-shark-ai.yml | 6 ++++-- .github/workflows/ci-sharktank.yml | 3 +++ .github/workflows/ci_eval.yaml | 12 ++++++++---- .github/workflows/ci_eval_short.yaml | 6 ++++-- 8 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index 966199bfc..06afca45a 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -33,6 +33,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -51,9 +52,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-llama-quick-tests.yaml b/.github/workflows/ci-llama-quick-tests.yaml index 433469fab..63478ab99 100644 --- a/.github/workflows/ci-llama-quick-tests.yaml +++ b/.github/workflows/ci-llama-quick-tests.yaml @@ -33,6 +33,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -51,9 +52,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 2ad88f54f..7d9545ffd 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -33,6 +33,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Checkout Code" @@ -48,9 +49,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index 394ca54a2..04caab6fc 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -34,6 +34,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Checkout Code" @@ -49,9 +50,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index c512bf530..11f2df76c 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -33,6 +33,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - name: "Checkout Code" @@ -48,9 +49,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} - name: Install pip deps run: | diff --git a/.github/workflows/ci-sharktank.yml b/.github/workflows/ci-sharktank.yml index 0d9e5d851..1a179322a 100644 --- a/.github/workflows/ci-sharktank.yml +++ b/.github/workflows/ci-sharktank.yml @@ -46,6 +46,7 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: path: ${{ env.PIP_CACHE_DIR }} key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} @@ -97,6 +98,7 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: path: ${{ env.PIP_CACHE_DIR }} key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} @@ -146,6 +148,7 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: path: ${{ env.PIP_CACHE_DIR }} key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index ad63b54c7..1f0c0b3a9 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -35,6 +35,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -49,9 +50,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} - name: Install sharktank deps run: | @@ -101,6 +103,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -115,9 +118,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - name: Install sharktank deps run: | diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index 114632f6d..f0a3d75fd 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -34,6 +34,7 @@ jobs: run: shell: bash env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -48,9 +49,10 @@ jobs: - name: Cache Pip Packages uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + id: cache-pip with: - path: ${{ env.VENV_DIR }} - key: pip-venv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} - name: Install sharktank deps run: | From 96a033d64b7575a308ab856abf361dca474ab456 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 4 Dec 2024 12:39:40 -0800 Subject: [PATCH 5/7] Remove pip cache steps for now. --- .github/workflows/ci-llama-large-tests.yaml | 7 ------- .github/workflows/ci-llama-quick-tests.yaml | 7 ------- .github/workflows/ci-sglang-benchmark.yml | 14 -------------- .github/workflows/ci-sglang-integration-tests.yml | 7 ------- .github/workflows/ci-shark-ai.yml | 7 ------- .github/workflows/ci_eval.yaml | 14 -------------- .github/workflows/ci_eval_short.yaml | 7 ------- 7 files changed, 63 deletions(-) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index 06afca45a..981f248fb 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -50,13 +50,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - - name: Install pip deps run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-llama-quick-tests.yaml b/.github/workflows/ci-llama-quick-tests.yaml index 63478ab99..86113029e 100644 --- a/.github/workflows/ci-llama-quick-tests.yaml +++ b/.github/workflows/ci-llama-quick-tests.yaml @@ -50,13 +50,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - - name: Install pip deps run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 50402d536..040417d63 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -58,13 +58,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ matrix.version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} - - name: Install pip deps run: | source ${VENV_DIR}/bin/activate @@ -120,13 +113,6 @@ jobs: with: python-version: ${{matrix.version}} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ matrix.version }} - - name: Install SGLang run: | python -m pip install --no-compile --upgrade pip diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index bee7b474a..e1c4d2776 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -47,13 +47,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} - - name: Install pip deps run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index 9b26f8376..1cb453765 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -46,13 +46,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','shortfin/requirements*.txt','sharktank/requirements*.txt') }} - - name: Install pip deps run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index 1f0c0b3a9..e15cee3ea 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -48,13 +48,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} - - name: Install sharktank deps run: | source ${VENV_DIR}/bin/activate @@ -116,13 +109,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} - - name: Install sharktank deps run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index f0a3d75fd..0b41e4a7c 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -47,13 +47,6 @@ jobs: - name: Create Python venv run: python -m venv ${VENV_DIR} - - name: Cache Pip Packages - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - id: cache-pip - with: - path: ${{ env.PIP_CACHE_DIR }} - key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt','sharktank/requirements*.txt') }} - - name: Install sharktank deps run: | source ${VENV_DIR}/bin/activate From 424289ee446de61b9f7c515a68b931afe2be9458 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 4 Dec 2024 13:58:19 -0800 Subject: [PATCH 6/7] Run pip freeze after all installs. --- .github/workflows/ci-llama-large-tests.yaml | 2 ++ .github/workflows/ci-llama-quick-tests.yaml | 2 ++ .github/workflows/ci-sglang-benchmark.yml | 2 ++ .github/workflows/ci-sglang-integration-tests.yml | 2 ++ .github/workflows/ci-shark-ai.yml | 2 ++ .github/workflows/ci_eval.yaml | 2 ++ .github/workflows/ci_eval_short.yaml | 2 ++ 7 files changed, 14 insertions(+) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index 981f248fb..b7027b451 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -69,6 +69,8 @@ jobs: iree-base-compiler \ iree-base-runtime + pip freeze + - name: Run llama tests run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-llama-quick-tests.yaml b/.github/workflows/ci-llama-quick-tests.yaml index 86113029e..7d66948cd 100644 --- a/.github/workflows/ci-llama-quick-tests.yaml +++ b/.github/workflows/ci-llama-quick-tests.yaml @@ -69,6 +69,8 @@ jobs: iree-base-compiler \ iree-base-runtime + pip freeze + - name: Run llama 8b f16 decomposed test run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 040417d63..35b4e32f0 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -81,6 +81,8 @@ jobs: # Install SGLang pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" + pip freeze + - name: Run Shortfin Benchmark Tests run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index e1c4d2776..29da0380a 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -70,6 +70,8 @@ jobs: pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python" pip install sentence_transformers + pip freeze + - name: Run Integration Tests run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index 1cb453765..ee373bb56 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -67,6 +67,8 @@ jobs: iree-base-compiler \ iree-base-runtime + pip freeze + - name: Run LLM Integration Tests run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index e15cee3ea..fb015e3d3 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -69,6 +69,8 @@ jobs: iree-base-compiler \ iree-base-runtime + pip freeze + - name: Run perplexity test with IREE run: | source ${VENV_DIR}/bin/activate diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index 0b41e4a7c..a7d0cda30 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -68,6 +68,8 @@ jobs: iree-base-compiler \ iree-base-runtime + pip freeze + - name: Run perplexity test with vmfb run: | source ${VENV_DIR}/bin/activate From 46625cd7eb10d09665c3e976e0ce6641406e6184 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 4 Dec 2024 15:18:00 -0800 Subject: [PATCH 7/7] Remove no longer used PIP_CACHE_DIR env vars. --- .github/workflows/ci-llama-large-tests.yaml | 1 - .github/workflows/ci-llama-quick-tests.yaml | 1 - .github/workflows/ci-sglang-benchmark.yml | 3 --- .github/workflows/ci-sglang-integration-tests.yml | 1 - .github/workflows/ci-shark-ai.yml | 1 - .github/workflows/ci_eval.yaml | 2 -- .github/workflows/ci_eval_short.yaml | 1 - 7 files changed, 10 deletions(-) diff --git a/.github/workflows/ci-llama-large-tests.yaml b/.github/workflows/ci-llama-large-tests.yaml index b7027b451..376f93938 100644 --- a/.github/workflows/ci-llama-large-tests.yaml +++ b/.github/workflows/ci-llama-large-tests.yaml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci-llama-quick-tests.yaml b/.github/workflows/ci-llama-quick-tests.yaml index 7d66948cd..ddbcc204a 100644 --- a/.github/workflows/ci-llama-quick-tests.yaml +++ b/.github/workflows/ci-llama-quick-tests.yaml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci-sglang-benchmark.yml b/.github/workflows/ci-sglang-benchmark.yml index 35b4e32f0..d53189483 100644 --- a/.github/workflows/ci-sglang-benchmark.yml +++ b/.github/workflows/ci-sglang-benchmark.yml @@ -45,7 +45,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -104,8 +103,6 @@ jobs: defaults: run: shell: bash - env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci-sglang-integration-tests.yml b/.github/workflows/ci-sglang-integration-tests.yml index 29da0380a..36a59779a 100644 --- a/.github/workflows/ci-sglang-integration-tests.yml +++ b/.github/workflows/ci-sglang-integration-tests.yml @@ -34,7 +34,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci-shark-ai.yml b/.github/workflows/ci-shark-ai.yml index ee373bb56..e662d125b 100644 --- a/.github/workflows/ci-shark-ai.yml +++ b/.github/workflows/ci-shark-ai.yml @@ -33,7 +33,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci_eval.yaml b/.github/workflows/ci_eval.yaml index fb015e3d3..565bf3352 100644 --- a/.github/workflows/ci_eval.yaml +++ b/.github/workflows/ci_eval.yaml @@ -35,7 +35,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -98,7 +97,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci_eval_short.yaml b/.github/workflows/ci_eval_short.yaml index a7d0cda30..6331e0709 100644 --- a/.github/workflows/ci_eval_short.yaml +++ b/.github/workflows/ci_eval_short.yaml @@ -34,7 +34,6 @@ jobs: run: shell: bash env: - PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" VENV_DIR: ${{ github.workspace }}/.venv steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2