Skip to content

fix(ci): fix model caching and PVC permissions for k8s GPU runners - #829

Closed
key4ng wants to merge 6 commits into
mainfrom
keyang/fix-model-path
Closed

key4ng wants to merge 6 commits into
mainfrom
keyang/fix-model-path

Conversation

@key4ng

@key4ng key4ng commented Mar 19, 2026 •

Copy link
Copy Markdown
Member

Description

Problem

K8s GPU runners have a 2Ti model-cache PVC mounted at /models, but:

  1. Wrong model path: Workflows used ROUTER_LOCAL_MODEL_PATH="/home/ubuntu/models" (bare-metal path) or "/raid/models" which don't exist on k8s runners, causing models to fall back to HuggingFace download every run
  2. PVC not writable: The /models PVC is root-owned (drwxr-xr-x root root), so the runner user (UID 1001) cannot write to it — downloads to ~/.cache/huggingface on ephemeral node disk instead
  3. Node disk too small: Nodes have ~350GB ephemeral storage; large models like minimax-m2 (~400GB) would exceed this and crash the pod
  4. No HF token: Gated models (Llama, etc.) require HF_TOKEN for download, which was not passed to workflows
  5. Nightly PR trigger broken: pull_request trigger was incorrectly nested under workflow_dispatch.inputs
  6. vLLM install broken: uv pip install vllm fails due to index strategy not matching platform tags

Solution

  • Set HF_HOME=/models on k8s workflows so HuggingFace downloads persist to the 2Ti PVC
  • Add fsGroup: 1001 + fsGroupChangePolicy: OnRootMismatch to all GPU runner pod specs so the PVC is writable by the runner user
  • Pass HF_TOKEN from GitHub secrets to all GPU workflows
  • Keep ROUTER_LOCAL_MODEL_PATH="/raid/models" for H200 bare-metal runners (unchanged)
  • Fix nightly benchmark pull_request trigger indentation
  • Fix vLLM install with --index-strategy unsafe-best-match

Changes

  • .github/workflows/e2e-gpu-job.yml — HF_HOME=/models, HF_TOKEN
  • .github/workflows/nightly-benchmark.yml — HF_HOME=/models for H100 jobs, HF_TOKEN + HF_HOME=/raid/models for H200, fix PR trigger
  • .github/workflows/pr-test-rust.yml — HF_HOME=/models for k8s GPU jobs
  • scripts/k8s-runner-resources/runner-values-*.yaml — add fsGroup: 1001, fsGroupChangePolicy: OnRootMismatch
  • scripts/ci_install_vllm.sh — add --index-strategy unsafe-best-match

Test Plan

  • Verify fsGroup is applied: kubectl exec <pod> -- ls -la /models should show group 1001
  • Verify model download persists: run e2e test, check /models/hub/ has model files
  • Verify nightly benchmark triggers on PR changes to e2e_test/benchmarks/**
  • Verify vLLM installs successfully on k8s runners
Checklist
  • cargo +nightly fmt passes (no Rust changes)
  • cargo clippy --all-targets --all-features -- -D warnings passes (no Rust changes)

Summary by CodeRabbit

  • Chores
    • Standardized model/cache environment handling across CI workflows for more consistent automated testing.
    • Enabled authenticated access to external model resources in GPU and E2E benchmark jobs for more reliable test execution.
    • Tweaked CI install flow to ensure a more robust vllm installation strategy.
    • Added pod-level filesystem security settings to runner templates to improve file ownership and runtime compatibility.
  • Tests
    • Adjusted benchmark and E2E test runs to use unified model paths for improved reproducibility.

Signed-off-by: key4ng <rukeyang@gmail.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Mar 19, 2026 •

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Workflow and Kubernetes runner configs updated: CI steps switched model/cache env from ROUTER_LOCAL_MODEL_PATH to HF_HOME in multiple workflows, added HF_TOKEN to several GPU/benchmark jobs, vllm pip install gained --index-strategy unsafe-best-match, and runner pod templates now include a pod-level securityContext (fsGroup + fsGroupChangePolicy).

Changes

Cohort / File(s) Summary
GitHub workflows (benchmarks & E2E)
.github/workflows/nightly-benchmark.yml, .github/workflows/pr-test-rust.yml, .github/workflows/e2e-gpu-job.yml
Replaced usages of ROUTER_LOCAL_MODEL_PATH with HF_HOME in pytest run steps/jobs; added HF_TOKEN: ${{ secrets.HF_TOKEN }} to several GPU/benchmark job environments (job- and step-level).
Kubernetes runner templates
scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml, scripts/k8s-runner-resources/runner-values-1-gpu.yaml, scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml, scripts/k8s-runner-resources/runner-values-4-gpu-general.yaml, scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml
Added pod-level securityContext with fsGroup: 1001 and fsGroupChangePolicy: OnRootMismatch to runner pod template spec.template.spec entries.
CI helper scripts
scripts/ci_install_vllm.sh
Updated pip install vllm invocation to include --index-strategy unsafe-best-match alongside the existing --extra-index-url option.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • CatherineSue
  • slin1237
  • XinyueZhang369

Poem

🐰 I hopped through YAML, changed a path to roam,
HF tokens snug, models found a new home.
Pip learned a trick, an index dance so spry,
Pods wear gentle groups as permissions comply.
CI nibbles carrots — a quiet, happy sigh. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: fixing model caching by switching to HF_HOME and fixing PVC permissions through securityContext (fsGroup) across CI workflows and k8s runner configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch keyang/fix-model-path
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the ci CI/CD configuration changes label Mar 19, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/nightly-benchmark.yml:
- Around line 201-202: The nightly benchmark workflow still references the old
PVC path for H200 jobs via the ROUTER_LOCAL_MODEL_PATH variable in the
single-worker-h200 job; update those occurrences to use the migrated path
(/models) consistently (e.g., replace ROUTER_LOCAL_MODEL_PATH="/raid/models"
with ROUTER_LOCAL_MODEL_PATH="/models" or switch the job to use
HF_HOME="/models" like the H100 jobs) so the matrix is consistent and runners
that expect the mounted PVC path will find models; search for
ROUTER_LOCAL_MODEL_PATH in the workflow (single-worker-h200 job and the other
H200 invocation mentioned) and make the same replacement in both places.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7893e161-d3ad-451d-80ff-d9cef9c23709

📥 Commits

Reviewing files that changed from the base of the PR and between e231a73 and f3ae25d.

📒 Files selected for processing (2)
  • .github/workflows/nightly-benchmark.yml
  • .github/workflows/pr-test-rust.yml

Comment on lines +201 to 202
HF_HOME="/models" \
pytest e2e_test/benchmarks/test_nightly_perf.py \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Complete the model-path migration for H200 nightly job as well.

These updates move H100 jobs to HF_HOME="/models", but Line 429-431 in single-worker-h200 still uses ROUTER_LOCAL_MODEL_PATH="/raid/models". This leaves the nightly benchmark matrix inconsistent and can still fail on runners expecting the mounted PVC path.

Suggested patch
-          E2E_RUNTIME=${{ matrix.variant.runtime }} \
-          ROUTER_LOCAL_MODEL_PATH="/raid/models" \
+          E2E_RUNTIME=${{ matrix.variant.runtime }} \
+          HF_HOME="/models" \
             pytest e2e_test/benchmarks/test_nightly_perf.py \
               -k "$K_FILTER" \
               -s -vv -o log_cli=true --log-cli-level=INFO

Also applies to: 314-315

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/nightly-benchmark.yml around lines 201 - 202, The nightly
benchmark workflow still references the old PVC path for H200 jobs via the
ROUTER_LOCAL_MODEL_PATH variable in the single-worker-h200 job; update those
occurrences to use the migrated path (/models) consistently (e.g., replace
ROUTER_LOCAL_MODEL_PATH="/raid/models" with ROUTER_LOCAL_MODEL_PATH="/models" or
switch the job to use HF_HOME="/models" like the H100 jobs) so the matrix is
consistent and runners that expect the mounted PVC path will find models; search
for ROUTER_LOCAL_MODEL_PATH in the workflow (single-worker-h200 job and the
other H200 invocation mentioned) and make the same replacement in both places.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3ae25d073

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- name: Run benchmarks
env:
ROUTER_LOCAL_MODEL_PATH: /home/ubuntu/models
HF_HOME: /models

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Set ROUTER_LOCAL_MODEL_PATH for local model fixtures

This replacement drops the only variable that e2e_test/infra/model_specs.py uses to resolve mounted local model directories (_resolve_model_path reads ROUTER_LOCAL_MODEL_PATH only). In these jobs, setup_backend will now pass HF model IDs instead of PVC-backed local paths, so workers can fall back to remote Hub resolution; that breaks or times out on runners without Hub access/tokens or when /models is a local mirror rather than HF cache metadata. Keep ROUTER_LOCAL_MODEL_PATH=/models here (you can still set HF_HOME in addition).

Useful? React with 👍 / 👎.

Signed-off-by: key4ng <rukeyang@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
.github/workflows/nightly-benchmark.yml (1)

420-433: ⚠️ Potential issue | 🟠 Major

Complete H200 migration to HF_HOME=/models and remove old path variable usage.

single-worker-h200 still uses /raid/models and ROUTER_LOCAL_MODEL_PATH, so the workflow is only partially migrated. This keeps H200 behavior inconsistent with H100 and can still fail on runners expecting /models.

Suggested patch
       - name: Run benchmark
         if: steps.filter.outputs.skip != 'true'
         env:
           GPU_TYPE: H200
           E2E_NIGHTLY: "1"
           E2E_LOG_DIR: nightly_gateway_logs
           HF_TOKEN: ${{ secrets.HF_TOKEN }}
-          HF_HOME: /raid/models
+          HF_HOME: /models
         run: |
           mkdir -p nightly_gateway_logs
           bash scripts/ci_killall_sglang.sh "nuk_gpus"
@@
           E2E_RUNTIME=${{ matrix.variant.runtime }} \
-          ROUTER_LOCAL_MODEL_PATH="/raid/models" \
+          HF_HOME="/models" \
             pytest e2e_test/benchmarks/test_nightly_perf.py \
               -k "$K_FILTER" \
               -s -vv -o log_cli=true --log-cli-level=INFO
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/nightly-benchmark.yml around lines 420 - 433, The workflow
still sets HF_HOME=/raid/models and passes
ROUTER_LOCAL_MODEL_PATH="/raid/models" for the H200 job; update the H200/nightly
job to complete the H200 migration by setting HF_HOME=/models (replace any
`/raid/models` occurrences) and remove usage of ROUTER_LOCAL_MODEL_PATH and any
references to that env var (e.g., the assignment
ROUTER_LOCAL_MODEL_PATH="/raid/models" and any consumer of
ROUTER_LOCAL_MODEL_PATH); ensure the matrix entry for single-worker-h200 and any
variant.grpc_only logic use HF_HOME=/models so H200 matches H100 behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/nightly-benchmark.yml:
- Around line 420-433: The workflow still sets HF_HOME=/raid/models and passes
ROUTER_LOCAL_MODEL_PATH="/raid/models" for the H200 job; update the H200/nightly
job to complete the H200 migration by setting HF_HOME=/models (replace any
`/raid/models` occurrences) and remove usage of ROUTER_LOCAL_MODEL_PATH and any
references to that env var (e.g., the assignment
ROUTER_LOCAL_MODEL_PATH="/raid/models" and any consumer of
ROUTER_LOCAL_MODEL_PATH); ensure the matrix entry for single-worker-h200 and any
variant.grpc_only logic use HF_HOME=/models so H200 matches H100 behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8998fde1-3e3f-4598-a661-7740feba3f4e

📥 Commits

Reviewing files that changed from the base of the PR and between f3ae25d and cec4bb8.

📒 Files selected for processing (2)
  • .github/workflows/e2e-gpu-job.yml
  • .github/workflows/nightly-benchmark.yml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cec4bb830a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

E2E_RUNTIME: ${{ inputs.engine }}
E2E_GPU_TIER: ${{ inputs.gpu_tier }}
ROUTER_LOCAL_MODEL_PATH: /home/ubuntu/models
HF_HOME: /models

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore ROUTER_LOCAL_MODEL_PATH in shared E2E GPU job

This change replaces ROUTER_LOCAL_MODEL_PATH with HF_HOME, but E2E model selection still resolves local fixtures only via ROUTER_LOCAL_MODEL_PATH (e2e_test/infra/model_specs.py, _resolve_model_path). With only HF_HOME set, workers receive HF model IDs instead of mounted PVC paths, so this workflow stops using /models/<org>/<model> and can fail or stall on runners without Hub access or complete HF cache metadata. Keep ROUTER_LOCAL_MODEL_PATH=/models here (you can set HF_HOME in addition).

Useful? React with 👍 / 👎.


E2E_RUNTIME=${{ matrix.variant.runtime }} \
ROUTER_LOCAL_MODEL_PATH="/raid/models" \
HF_HOME="/models" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve local model path env in nightly H100 benchmark runs

Switching the benchmark invocation to HF_HOME drops the variable that nightly benchmark plumbing uses for local model mounts: e2e_test/infra/model_specs.py resolves model paths from ROUTER_LOCAL_MODEL_PATH, and e2e_test/benchmarks/conftest.py uses that same env var to mount local model/tokenizer directories into genai-bench. As written, these H100 jobs no longer target mounted local model dirs and may regress to remote Hub resolution/download behavior. Set ROUTER_LOCAL_MODEL_PATH=/models for these pytest commands (optionally alongside HF_HOME).

Useful? React with 👍 / 👎.

@mergify

mergify Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Hi @key4ng, the DCO sign-off check has failed. All commits must include a Signed-off-by line.

To fix existing commits:

# Sign off the last N commits (replace N with the number of unsigned commits)
git rebase HEAD~N --signoff
git push --force-with-lease

To sign off future commits automatically:

  • Use git commit -s every time, or
  • VSCode: enable Git: Always Sign Off in Settings
  • PyCharm: enable Sign-off commit in the Commit tool window

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
.github/workflows/nightly-benchmark.yml (1)

422-435: ⚠️ Potential issue | 🟠 Major

Complete the H200 migration away from /raid/models.

The H200 benchmark step still sets HF_HOME to /raid/models (Line 423) and still injects ROUTER_LOCAL_MODEL_PATH="/raid/models" (Line 434), so this remains inconsistent with the /models migration.

Suggested patch
       - name: Run benchmark
         if: steps.filter.outputs.skip != 'true'
         env:
           GPU_TYPE: H200
           E2E_NIGHTLY: "1"
           E2E_LOG_DIR: nightly_gateway_logs
           HF_TOKEN: ${{ secrets.HF_TOKEN }}
-          HF_HOME: /raid/models
+          HF_HOME: /models
         run: |
           mkdir -p nightly_gateway_logs
           bash scripts/ci_killall_sglang.sh "nuk_gpus"

           K_FILTER="${{ matrix.model.test_class }}"
           if [ "${{ matrix.variant.grpc_only }}" == "true" ]; then
             K_FILTER="${{ matrix.model.test_class }} and grpc"
           fi

           E2E_RUNTIME=${{ matrix.variant.runtime }} \
-          ROUTER_LOCAL_MODEL_PATH="/raid/models" \
             pytest e2e_test/benchmarks/test_nightly_perf.py \
               -k "$K_FILTER" \
               -s -vv -o log_cli=true --log-cli-level=INFO
#!/bin/bash
# Verify model-path migration consistency in workflows.
rg -n 'ROUTER_LOCAL_MODEL_PATH|HF_HOME:\s*/raid/models|HF_HOME="/raid/models"' .github/workflows -C2

Expected result after fix: no /raid/models references in migrated benchmark/e2e paths.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/nightly-benchmark.yml around lines 422 - 435, Update the
nightly benchmark workflow to finish the H200 migration by replacing hardcoded
/raid/models references: change the HF_HOME environment variable (HF_HOME) and
the injected ROUTER_LOCAL_MODEL_PATH value (ROUTER_LOCAL_MODEL_PATH) from
"/raid/models" to the migrated path "/models" (or to the appropriate
matrix-provided path if configurable), ensuring the pytest invocation for
e2e_test/benchmarks/test_nightly_perf.py continues to receive the correct
E2E_RUNTIME and model path; search for HF_HOME and ROUTER_LOCAL_MODEL_PATH in
the job step and update both occurrences so no /raid/models remains.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/nightly-benchmark.yml:
- Around line 422-435: Update the nightly benchmark workflow to finish the H200
migration by replacing hardcoded /raid/models references: change the HF_HOME
environment variable (HF_HOME) and the injected ROUTER_LOCAL_MODEL_PATH value
(ROUTER_LOCAL_MODEL_PATH) from "/raid/models" to the migrated path "/models" (or
to the appropriate matrix-provided path if configurable), ensuring the pytest
invocation for e2e_test/benchmarks/test_nightly_perf.py continues to receive the
correct E2E_RUNTIME and model path; search for HF_HOME and
ROUTER_LOCAL_MODEL_PATH in the job step and update both occurrences so no
/raid/models remains.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 053cc266-45d6-435c-9d53-9dcb34f832d0

📥 Commits

Reviewing files that changed from the base of the PR and between cec4bb8 and 339d123.

📒 Files selected for processing (2)
  • .github/workflows/e2e-gpu-job.yml
  • .github/workflows/nightly-benchmark.yml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 339d123786

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

export CGO_LDFLAGS="-L$(pwd)/bindings/golang/target/release"
export LD_LIBRARY_PATH="$(pwd)/bindings/golang/target/release:$LD_LIBRARY_PATH"
SHOW_WORKER_LOGS=0 SHOW_ROUTER_LOGS=1 ROUTER_LOCAL_MODEL_PATH="/home/ubuntu/models" \
SHOW_WORKER_LOGS=0 SHOW_ROUTER_LOGS=1 HF_HOME="/models" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore ROUTER_LOCAL_MODEL_PATH for Go bindings E2E

This step now sets only HF_HOME, but the Go bindings E2E path resolution still depends on ROUTER_LOCAL_MODEL_PATH: e2e_test/infra/model_specs.py only rewrites model IDs to mounted local paths when that variable is present, and e2e_test/bindings_go/conftest.py uses the resolved value for SGL_TOKENIZER_PATH. Without ROUTER_LOCAL_MODEL_PATH, the tokenizer path becomes a HF model ID and can fall back to Hub resolution/download (this job does not set HF_TOKEN), which can fail or hang on runners that rely on pre-mounted local models.

Useful? React with 👍 / 👎.

key4ng added 2 commits March 19, 2026 13:18
Signed-off-by: key4ng <rukeyang@gmail.com>
Signed-off-by: key4ng <rukeyang@gmail.com>
@key4ng
key4ng force-pushed the keyang/fix-model-path branch from 339d123 to 9a3267e Compare March 19, 2026 20:19
@key4ng
key4ng requested a review from gongwei-130 as a code owner March 19, 2026 20:19

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/nightly-benchmark.yml (1)

422-424: ⚠️ Potential issue | 🟠 Major

Complete the H200 model-path migration to avoid mixed behavior.

Line 423 sets HF_HOME, but Line 434 still exports ROUTER_LOCAL_MODEL_PATH, so the H200 path migration remains inconsistent with H100 jobs and can still follow the legacy variable/path.

Suggested patch
-          HF_HOME: /raid/models
+          HF_HOME: /models
...
-          E2E_RUNTIME=${{ matrix.variant.runtime }} \
-          ROUTER_LOCAL_MODEL_PATH="/raid/models" \
+          E2E_RUNTIME=${{ matrix.variant.runtime }} \
+          HF_HOME="/models" \
             pytest e2e_test/benchmarks/test_nightly_perf.py \
               -k "$K_FILTER" \
               -s -vv -o log_cli=true --log-cli-level=INFO

Also applies to: 433-435

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/nightly-benchmark.yml around lines 422 - 424, The H200 job
still exports the legacy ROUTER_LOCAL_MODEL_PATH causing mixed behavior; update
the workflow so H200 uses the same HF_HOME-based path as H100 instead of
exporting ROUTER_LOCAL_MODEL_PATH. Locate where ROUTER_LOCAL_MODEL_PATH is
exported and either remove that export or set ROUTER_LOCAL_MODEL_PATH to
reference HF_HOME (e.g., ROUTER_LOCAL_MODEL_PATH=${{ env.HF_HOME }} or
equivalent) so all jobs consistently use HF_HOME for model location.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/ci_install_vllm.sh`:
- Line 23: The pip install invocation "uv pip install vllm --extra-index-url
https://wheels.vllm.ai/nightly/cu129 --index-strategy unsafe-best-match" is
using the unsafe index strategy; change it to a deterministic approach by either
pinning to an exact nightly wheel URL (e.g., replace the package spec with a
vllm @ https://wheels.vllm.ai/nightly/cu129/vllm-<date>-...whl), or switch the
pip flag to "--index-strategy first-index" so the primary index is preferred and
the nightly index is only a fallback, or add an explicit comment documenting why
"unsafe-best-match" is an acceptable CI trade-off for the vllm nightly
requirement.

---

Duplicate comments:
In @.github/workflows/nightly-benchmark.yml:
- Around line 422-424: The H200 job still exports the legacy
ROUTER_LOCAL_MODEL_PATH causing mixed behavior; update the workflow so H200 uses
the same HF_HOME-based path as H100 instead of exporting
ROUTER_LOCAL_MODEL_PATH. Locate where ROUTER_LOCAL_MODEL_PATH is exported and
either remove that export or set ROUTER_LOCAL_MODEL_PATH to reference HF_HOME
(e.g., ROUTER_LOCAL_MODEL_PATH=${{ env.HF_HOME }} or equivalent) so all jobs
consistently use HF_HOME for model location.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3f8e87d8-bc90-46d7-a8d6-0f13b12b8370

📥 Commits

Reviewing files that changed from the base of the PR and between 339d123 and 9a3267e.

📒 Files selected for processing (3)
  • .github/workflows/e2e-gpu-job.yml
  • .github/workflows/nightly-benchmark.yml
  • scripts/ci_install_vllm.sh


echo "Installing vLLM (nightly for smg-grpc-servicer support)..."
uv pip install vllm --extra-index-url https://wheels.vllm.ai/nightly/cu129
uv pip install vllm --extra-index-url https://wheels.vllm.ai/nightly/cu129 --index-strategy unsafe-best-match

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Confirm the exact install line in repo
fd "ci_install_vllm.sh" --exec sed -n '20,26p' {}

# 2) Verify supported index strategy values in the CI toolchain image
if command -v uv >/dev/null 2>&1; then
  uv --version
  uv pip install --help | sed -n '/--index-strategy/,+12p'
else
  printf 'uv is not installed in this sandbox. Re-run these two commands in the CI image:\n'
  printf '  uv --version\n'
  printf '  uv pip install --help | sed -n '\''/--index-strategy/,+12p'\''\n'
fi

Repository: lightseekorg/smg

Length of output: 519


🌐 Web query:

uv pip install --index-strategy unsafe-best-match documentation

💡 Result:

uv pip install --index-strategy unsafe-best-match is documented in uv’s pip compatibility docs under the section about packages that exist on multiple indexes. It explains that unsafe-best-match is the closest behavior to pip when you use multiple indexes (e.g., --extra-index-url), but it is unsafe because it can enable dependency confusion risks. [1]

Configuration docs also list index-strategy (including unsafe-best-match) as a setting you can put under [tool.uv.pip] (and you can set it via the UV_INDEX_STRATEGY environment variable as well). [2]

Sources: uv “Compatibility with pip” docs (index strategies + warning). [1] uv “Settings” reference (the index-strategy setting / config location). [2]


🏁 Script executed:

# Check if there are any comments or git history around this line
git log --oneline -n 20 scripts/ci_install_vllm.sh 2>/dev/null || echo "Git not available"

# Check for any documentation or comments in the script
cat scripts/ci_install_vllm.sh

# Search for other uses of index-strategy in the codebase
rg "index-strategy" --type sh --type py --type yaml --type txt

Repository: lightseekorg/smg

Length of output: 1314


🏁 Script executed:

# Check if vllm is pinned elsewhere or if there's a requirements file
fd "requirements" --type f | head -20
fd "pyproject" --type f | head -20
rg "vllm" --type py --type txt -A 2 -B 2 | head -50

Repository: lightseekorg/smg

Length of output: 3866


Reconsider unsafe-best-match strategy even for nightly wheels.

Line 23 uses --index-strategy unsafe-best-match, which uv's documentation explicitly marks as unsafe for dependency-confusion risks. This can also cause non-deterministic CI resolution (different runs may resolve different nightly wheels).

Since your script requires nightly vllm for smg-grpc-servicer support, pinning an exact version isn't practical. Instead, consider:

  • Pin the nightly wheel URL or build date (e.g., vllm @ https://wheels.vllm.ai/nightly/cu129/vllm-<date>-...whl) to ensure determinism.
  • Or use --index-strategy first-index (only resolve from primary index, with extra-index as fallback) if the nightly index is reliable.
  • Or document why the unsafe strategy trade-off is acceptable in your CI context.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/ci_install_vllm.sh` at line 23, The pip install invocation "uv pip
install vllm --extra-index-url https://wheels.vllm.ai/nightly/cu129
--index-strategy unsafe-best-match" is using the unsafe index strategy; change
it to a deterministic approach by either pinning to an exact nightly wheel URL
(e.g., replace the package spec with a vllm @
https://wheels.vllm.ai/nightly/cu129/vllm-<date>-...whl), or switch the pip flag
to "--index-strategy first-index" so the primary index is preferred and the
nightly index is only a fallback, or add an explicit comment documenting why
"unsafe-best-match" is an acceptable CI trade-off for the vllm nightly
requirement.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a3267e923

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


echo "Installing vLLM (nightly for smg-grpc-servicer support)..."
uv pip install vllm --extra-index-url https://wheels.vllm.ai/nightly/cu129
uv pip install vllm --extra-index-url https://wheels.vllm.ai/nightly/cu129 --index-strategy unsafe-best-match

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep safe index resolution for vLLM install

uv help pip install documents that the default first-index strategy is what prevents dependency-confusion attacks, while unsafe-best-match searches all indexes and picks the “best” version across them. In this CI path we install from both PyPI and wheels.vllm.ai, so switching to unsafe-best-match can silently pull a different package build (or transitive dependency) than the intended CUDA-specific/nightly source, making installs less predictable and weakening supply-chain safety for PR jobs.

Useful? React with 👍 / 👎.

Signed-off-by: key4ng <rukeyang@gmail.com>
@key4ng key4ng changed the title fix(ci): fix model path using mounted pvc location(wip) fix(ci): fix model caching and PVC permissions for k8s GPU runners Mar 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfc2a8013b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

E2E_NIGHTLY: "1"
E2E_LOG_DIR: nightly_gateway_logs
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_HOME: /raid/models

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid duplicating /raid/models bind mount in H200 benchmark

single-worker-h200 now exports HF_HOME: /raid/models while the pytest command still sets ROUTER_LOCAL_MODEL_PATH="/raid/models". In e2e_test/benchmarks/conftest.py::_build_command, those two env vars each add a -v /raid/models:/raid/models mount, creating duplicate destination mounts in the generated docker run command. Docker treats duplicate mount destinations as an error (Duplicate mount point), so this can fail nightly H200 benchmark runs before tests execute.

Useful? React with 👍 / 👎.

Signed-off-by: key4ng <rukeyang@gmail.com>
@key4ng key4ng closed this Mar 23, 2026
@lightseek-bot
lightseek-bot deleted the keyang/fix-model-path branch March 23, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant