From c9a294fa0430c1c581787449401ad843faff3048 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Thu, 29 May 2025 19:02:17 -0700 Subject: [PATCH 01/12] Remove path filter CI tests Signed-off-by: Christian Kadner --- .github/workflows/test.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ea3aeb76..4b3eb7457 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,21 +1,15 @@ name: Test on: - # Don't use pull_request.paths filter since this workflow is required for - # all pull requests on main irrespective of file type or location + # Don't use `paths` or `paths-ignore` filter since this workflow is required + # for all pull requests on main irrespective of file type or location + # Use `changed-src-files` step to determine if source code was changed pull_request: branches: - main - paths-ignore: - - 'docs/**' push: branches: - main - paths: - - "tests/**/*.py" - - "vllm_spyre/**/*.py" - - pyproject.toml - - .github/workflows/test.yml workflow_dispatch: env: @@ -69,6 +63,20 @@ jobs: with: fetch-depth: 1 + - name: "Get changed source files" + id: changed-src-files + uses: tj-actions/changed-files@v46 + with: # Avoid using single or double quotes for multiline patterns + files: | + tests/**/*.py + vllm_spyre/**/*.py + pyproject.toml + .github/workflows/test.yml + + - name: "Skip tests for non-source changes" + if: steps.changed-src-files.outputs.any_changed != 'true' + run: exit 0 + - name: "Install PyTorch" run: | pip install torch=="2.5.1+cpu" --index-url https://download.pytorch.org/whl/cpu From a6efb9486b18650fe0a474d3bf1bd8bdb64c6982 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Thu, 29 May 2025 19:06:33 -0700 Subject: [PATCH 02/12] Remove .github/workflows/test.yml Temporarily remove .github/workflows/test.yml file from the list of changed source files to test skipping the test workflow Signed-off-by: Christian Kadner --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b3eb7457..defe67589 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,12 +66,11 @@ jobs: - name: "Get changed source files" id: changed-src-files uses: tj-actions/changed-files@v46 - with: # Avoid using single or double quotes for multiline patterns + with: # Avoid using single or double quotes for multiline patterns, TODO: add .github/workflows/test.yml files: | tests/**/*.py vllm_spyre/**/*.py pyproject.toml - .github/workflows/test.yml - name: "Skip tests for non-source changes" if: steps.changed-src-files.outputs.any_changed != 'true' From ea2d8597d59c974fa606aec13cd2431b5e05f260 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Thu, 29 May 2025 19:32:40 -0700 Subject: [PATCH 03/12] Run test steps only if sources changed Signed-off-by: Christian Kadner --- .github/workflows/test.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index defe67589..cef2c4d96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,7 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 100 # assume PRs are less than 100 commits, >1 needed for tj-actions/changed-files on push - name: "Get changed source files" id: changed-src-files @@ -72,15 +72,13 @@ jobs: vllm_spyre/**/*.py pyproject.toml - - name: "Skip tests for non-source changes" - if: steps.changed-src-files.outputs.any_changed != 'true' - run: exit 0 - - name: "Install PyTorch" + if: steps.changed-src-files.outputs.any_changed == 'true' run: | pip install torch=="2.5.1+cpu" --index-url https://download.pytorch.org/whl/cpu - name: "Install uv" + if: steps.changed-src-files.outputs.any_changed == 'true' uses: astral-sh/setup-uv@v5 with: version: "latest" @@ -91,11 +89,12 @@ jobs: pyproject.toml - name: "Set vLLM version" - if: matrix.vllm_version.repo + if: (steps.changed-src-files.outputs.any_changed == 'true' && matrix.vllm_version.repo) run: | uv add ${{ matrix.vllm_version.repo }} - name: "Install vLLM with Spyre plugin" + if: steps.changed-src-files.outputs.any_changed == 'true' run: | uv venv .venv --system-site-packages source .venv/bin/activate @@ -108,6 +107,7 @@ jobs: uv pip install -v . - name: "Restore HF models cache" + if: steps.changed-src-files.outputs.any_changed == 'true' uses: actions/cache/restore@v4 with: path: ${{ env.HF_HUB_CACHE }} @@ -116,6 +116,7 @@ jobs: ${{ runner.os }}-hub-cache - name: "Download HF models" + if: steps.changed-src-files.outputs.any_changed == 'true' run: | mkdir -p "${VLLM_SPYRE_TEST_MODEL_DIR}" @@ -140,13 +141,14 @@ jobs: ls "${VLLM_SPYRE_TEST_MODEL_DIR}" > cached_models.txt - name: "Save HF models cache" - if: ( github.event_name != 'pull_request' && strategy.job-index == 0 ) + if: ( steps.changed-src-files.outputs.any_changed == 'true' && github.event_name != 'pull_request' && strategy.job-index == 0 ) uses: actions/cache/save@v4 with: path: ${{ env.HF_HUB_CACHE }} key: ${{ runner.os }}-hub-cache-${{ hashFiles('cached_models.txt') }} - name: "Run tests" + if: steps.changed-src-files.outputs.any_changed == 'true' env: MASTER_PORT: 12355 MASTER_ADDR: localhost From f66efba244cd57f3a59fca33cbd5fcb9d025c100 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 09:39:50 -0700 Subject: [PATCH 04/12] Modify a source file Signed-off-by: Christian Kadner --- vllm_spyre/perf_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_spyre/perf_metrics.py b/vllm_spyre/perf_metrics.py index 6826b7e47..db555714f 100644 --- a/vllm_spyre/perf_metrics.py +++ b/vllm_spyre/perf_metrics.py @@ -13,7 +13,7 @@ def create_perf_metric_logger(rank: int): class SpyrePerfMetricLoggerBase: - """ A no-op base class for use when logging is disabled """ + """ A no-op base class for use when logging is disabled. """ def __init__(self, rank: int): self.rank = rank From 2030f6275253e41d9cba6125c5d4d3b8ec8b5123 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 09:59:47 -0700 Subject: [PATCH 05/12] Modify a doc file Signed-off-by: Christian Kadner --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 0de4c9c4a..73fdabd58 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ Live doc: [vllm-spyre.readthedocs.io](https://vllm-spyre.readthedocs.io) -## Build the docs +## How to build the docs ```bash # Install dependencies. @@ -13,7 +13,7 @@ make clean make html ``` -## Open the docs with your browser +## How to view the docs in a web browser ```bash python -m http.server -d _build/html/ From 5fbd8e966207b03dbed1b9290debb4dd2d0ea9bf Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:00:42 -0700 Subject: [PATCH 06/12] Modify another doc file Signed-off-by: Christian Kadner --- docs/source/user_guide/supported_features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/user_guide/supported_features.md b/docs/source/user_guide/supported_features.md index 131a47038..c423a4d0a 100644 --- a/docs/source/user_guide/supported_features.md +++ b/docs/source/user_guide/supported_features.md @@ -1,6 +1,6 @@ # Supported Features -This table summarize the status of features on Spyre. By default, those features are planned to be developed using vLLM engine V1. +This table summarizes the status of features on Spyre. By default, those features are planned to be developed using vLLM engine V1. | Feature | Status | Note | |-------------------------------|--------|------| From f695f52c337b05db758a54f0c72c9ecac7866f30 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:03:19 -0700 Subject: [PATCH 07/12] Set fetch-depth to 1 Signed-off-by: Christian Kadner --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cef2c4d96..93f08fbac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,7 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 with: - fetch-depth: 100 # assume PRs are less than 100 commits, >1 needed for tj-actions/changed-files on push + fetch-depth: 1 # assume PRs are less than 100 commits, >1 needed for tj-actions/changed-files on push - name: "Get changed source files" id: changed-src-files From bf44c88e4a5ebb950d5c72859ff1ff62994923c9 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:21:57 -0700 Subject: [PATCH 08/12] Undo doc changes Signed-off-by: Christian Kadner --- docs/README.md | 4 ++-- docs/source/user_guide/supported_features.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 73fdabd58..0de4c9c4a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ Live doc: [vllm-spyre.readthedocs.io](https://vllm-spyre.readthedocs.io) -## How to build the docs +## Build the docs ```bash # Install dependencies. @@ -13,7 +13,7 @@ make clean make html ``` -## How to view the docs in a web browser +## Open the docs with your browser ```bash python -m http.server -d _build/html/ diff --git a/docs/source/user_guide/supported_features.md b/docs/source/user_guide/supported_features.md index c423a4d0a..131a47038 100644 --- a/docs/source/user_guide/supported_features.md +++ b/docs/source/user_guide/supported_features.md @@ -1,6 +1,6 @@ # Supported Features -This table summarizes the status of features on Spyre. By default, those features are planned to be developed using vLLM engine V1. +This table summarize the status of features on Spyre. By default, those features are planned to be developed using vLLM engine V1. | Feature | Status | Note | |-------------------------------|--------|------| From 0b610f99d02f504476f5a89752a2b09b0921700c Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:22:15 -0700 Subject: [PATCH 09/12] Undo source changes Signed-off-by: Christian Kadner --- vllm_spyre/perf_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_spyre/perf_metrics.py b/vllm_spyre/perf_metrics.py index db555714f..6826b7e47 100644 --- a/vllm_spyre/perf_metrics.py +++ b/vllm_spyre/perf_metrics.py @@ -13,7 +13,7 @@ def create_perf_metric_logger(rank: int): class SpyrePerfMetricLoggerBase: - """ A no-op base class for use when logging is disabled. """ + """ A no-op base class for use when logging is disabled """ def __init__(self, rank: int): self.rank = rank From bfd9e312aaf8fae71ad293bbac54a58a31ed916b Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:23:39 -0700 Subject: [PATCH 10/12] Restore source files list for test workflow Signed-off-by: Christian Kadner --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93f08fbac..582664de6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,11 +66,12 @@ jobs: - name: "Get changed source files" id: changed-src-files uses: tj-actions/changed-files@v46 - with: # Avoid using single or double quotes for multiline patterns, TODO: add .github/workflows/test.yml + with: # Avoid using single or double quotes for multiline patterns files: | + .github/workflows/test.yml + pyproject.toml tests/**/*.py vllm_spyre/**/*.py - pyproject.toml - name: "Install PyTorch" if: steps.changed-src-files.outputs.any_changed == 'true' From baeabe5b69cc9382fc14e96f9efcedcf1094a6af Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:25:09 -0700 Subject: [PATCH 11/12] Don't skip linters for doc-only PRs Signed-off-by: Christian Kadner --- .github/workflows/lint_actions.yml | 3 +-- .github/workflows/lint_code.yml | 5 +---- .github/workflows/lint_scripts.yml | 7 ++----- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lint_actions.yml b/.github/workflows/lint_actions.yml index b83d68904..f297284ab 100644 --- a/.github/workflows/lint_actions.yml +++ b/.github/workflows/lint_actions.yml @@ -1,9 +1,8 @@ name: Lint GitHub Actions on: - # Trigger the workflow on push or pull request, but only for the main branch. # Don't use pull_request.paths filter since this workflow is required for - # all pull requests on main irrespective of file type or location. + # all pull requests on main irrespective of file type or location pull_request: branches: - main diff --git a/.github/workflows/lint_code.yml b/.github/workflows/lint_code.yml index f22785ec2..e96b4231d 100644 --- a/.github/workflows/lint_code.yml +++ b/.github/workflows/lint_code.yml @@ -1,14 +1,11 @@ name: Lint Code on: - # Trigger the workflow on push or pull request, but only for the main branch. # Don't use pull_request.paths filter since this workflow is required for - # all pull requests on main irrespective of file type or location. + # all pull requests on main irrespective of file type or location pull_request: branches: - main - paths-ignore: - - 'docs/**' push: branches: - main diff --git a/.github/workflows/lint_scripts.yml b/.github/workflows/lint_scripts.yml index 2078739db..50dcb9cb4 100644 --- a/.github/workflows/lint_scripts.yml +++ b/.github/workflows/lint_scripts.yml @@ -1,17 +1,14 @@ name: Lint Scripts on: - # Trigger the workflow on push or pull request, but only for the main branch. # Don't use pull_request.paths filter since this workflow is required for - # all pull requests on main irrespective of file type or location. + # all pull requests on main irrespective of file type or location pull_request: branches: - main - paths-ignore: - - 'docs/**' push: branches: - - "main" + - main paths: - '**/*.sh' - '.github/workflows/lint_scripts.yml' From a6fdcc0cfa862ad8895f86b6b9cdd55009dbc732 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 2 Jun 2025 10:26:30 -0700 Subject: [PATCH 12/12] Remove fetch-depth comment Signed-off-by: Christian Kadner --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 582664de6..81ef473dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,7 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 with: - fetch-depth: 1 # assume PRs are less than 100 commits, >1 needed for tj-actions/changed-files on push + fetch-depth: 1 - name: "Get changed source files" id: changed-src-files