Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/e2e-gpu-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
E2E_ENGINE: ${{ inputs.engine }}
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 👍 / 👎.

HF_TOKEN: ${{ secrets.HF_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/nightly-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ jobs:
E2E_NIGHTLY: "1"
E2E_MODEL_TP_OVERRIDES: '{"meta-llama/Llama-3.1-8B-Instruct":1,"Qwen/Qwen2.5-7B-Instruct":1,"Qwen/Qwen3-30B-A3B":1}'
E2E_LOG_DIR: nightly_gateway_logs
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
mkdir -p nightly_gateway_logs
bash scripts/ci_killall_sglang.sh "nuk_gpus"
Expand All @@ -198,7 +199,7 @@ jobs:
fi

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 👍 / 👎.

pytest e2e_test/benchmarks/test_nightly_perf.py \
Comment on lines +201 to 202

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.

-k "$K_FILTER" \
-s -vv -o log_cli=true --log-cli-level=INFO
Expand Down Expand Up @@ -301,6 +302,7 @@ jobs:
E2E_NIGHTLY: "1"
E2E_MODEL_TP_OVERRIDES: '{"meta-llama/Llama-3.1-8B-Instruct":1,"Qwen/Qwen2.5-7B-Instruct":1,"Qwen/Qwen3-30B-A3B":1}'
E2E_LOG_DIR: nightly_gateway_logs
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
mkdir -p nightly_gateway_logs
bash scripts/ci_killall_sglang.sh "nuk_gpus"
Expand All @@ -311,7 +313,7 @@ jobs:
fi

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
Expand Down Expand Up @@ -417,6 +419,8 @@ jobs:
GPU_TYPE: H200
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 👍 / 👎.

run: |
mkdir -p nightly_gateway_logs
bash scripts/ci_killall_sglang.sh "nuk_gpus"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ jobs:

- 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 👍 / 👎.

run: |
bash scripts/ci_killall_sglang.sh "nuk_gpus"
SHOW_WORKER_LOGS=0 SHOW_ROUTER_LOGS=1 pytest e2e_test/benchmarks \
Expand Down Expand Up @@ -790,7 +790,7 @@ jobs:
bash scripts/ci_killall_sglang.sh "nuk_gpus"
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 👍 / 👎.

pytest --reruns 2 --reruns-delay 5 e2e_test/bindings_go -s -vv

go-bindings-benchmark:
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci_install_vllm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
echo "Using uv version: $(uv --version)"

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.

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 👍 / 👎.


# Install nixl for vLLM PD disaggregation (NIXL KV transfer)
echo "Installing nixl..."
Expand Down
3 changes: 3 additions & 0 deletions scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ keyVault: {}
## Runner pod template
template:
spec:
securityContext:
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
terminationGracePeriodSeconds: 600

nodeSelector:
Expand Down
3 changes: 3 additions & 0 deletions scripts/k8s-runner-resources/runner-values-1-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ keyVault: {}
## Runner pod template
template:
spec:
securityContext:
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
terminationGracePeriodSeconds: 600

nodeSelector:
Expand Down
3 changes: 3 additions & 0 deletions scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ keyVault: {}
## Runner pod template
template:
spec:
securityContext:
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
terminationGracePeriodSeconds: 600

nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ keyVault: {}
## Runner pod template
template:
spec:
securityContext:
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
terminationGracePeriodSeconds: 600

nodeSelector:
Expand Down
3 changes: 3 additions & 0 deletions scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ keyVault: {}
## Runner pod template
template:
spec:
securityContext:
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
terminationGracePeriodSeconds: 600

nodeSelector:
Expand Down
Loading