From de5e38e185478960f491a20c6f91934258fabbf6 Mon Sep 17 00:00:00 2001 From: Alfred Date: Mon, 1 Dec 2025 01:49:43 +0800 Subject: [PATCH] fix: correct typos and bugs in documentation and scripts - README.md: Fix typo 'vllm-cl' -> 'vllm-cli' in Basic Usage section - Makefile: Add missing targets to .PHONY declaration (test-cov, format-check, type-check, ci-local, ci-matrix, pre-commit) - scripts/test_ci_locally.sh: Fix pytest-cov detection using Python import instead of shell command - scripts/test_ci_locally.sh: Add Python 3.11+ tomllib compatibility for pyproject.toml validation - docs/profiles.md: Fix grammar 'defaults configuration' -> 'default configuration' - docs/profiles.md: Update VLLM_ATTENTION_BACKEND value to match actual profile usage --- Makefile | 2 +- README.md | 2 +- docs/profiles.md | 4 ++-- scripts/test_ci_locally.sh | 15 +++++++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index fc67ebb..7386a53 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help test lint format clean install ci-test all +.PHONY: help test test-cov lint format format-check type-check clean install ci-test ci-local ci-matrix all pre-commit # Default target help: diff --git a/README.md b/README.md index 75716a6..4fc6b44 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ pipx install --pip-args="--pre" "vllm-cli[vllm]" ```bash # Interactive mode - menu-driven interface -vllm-cl +vllm-cli # Serve a model vllm-cli serve --model openai/gpt-oss-20b diff --git a/docs/profiles.md b/docs/profiles.md index 0fbf19d..d8a1ed0 100644 --- a/docs/profiles.md +++ b/docs/profiles.md @@ -5,7 +5,7 @@ Seven carefully designed profiles cover most common use cases and hardware confi ## General Purpose Profiles ### `standard` - Minimal configuration with smart defaults -Uses vLLM's defaults configuration. Perfect for most models and hardware setups. +Uses vLLM's default configuration. Perfect for most models and hardware setups. **Use Case:** Starting point for any model, general inference tasks **Configuration:** No additional arguments - uses vLLM defaults @@ -182,7 +182,7 @@ Common environment variables used in profiles: | Variable | Purpose | Values | |----------|---------|---------| -| `VLLM_ATTENTION_BACKEND` | Attention computation backend | `FLASH_ATTN`, `XFORMERS`, `TRITON` | +| `VLLM_ATTENTION_BACKEND` | Attention computation backend | `FLASH_ATTN`, `XFORMERS`, `TRITON_ATTN_VLLM_V1` | | `VLLM_USE_TRITON_FLASH_ATTN` | Enable Triton flash attention | `0`, `1` | | `VLLM_ENABLE_FUSED_MOE_ACTIVATION_CHUNKING` | MoE activation chunking | `0`, `1` | | `VLLM_USE_FLASHINFER_MXFP4_BF16_MOE` | BF16 precision for MoE | `0`, `1` | diff --git a/scripts/test_ci_locally.sh b/scripts/test_ci_locally.sh index b3eb71a..c23a195 100755 --- a/scripts/test_ci_locally.sh +++ b/scripts/test_ci_locally.sh @@ -51,8 +51,10 @@ fi run_test "Unit Tests" "pytest tests/ -v --tb=short" # 4. Check Test Coverage (optional but informative) -if command -v pytest-cov &> /dev/null; then +if python -c "import pytest_cov" 2>/dev/null; then run_test "Test Coverage" "pytest tests/ --cov=src/vllm_cli --cov-report=term-missing --cov-fail-under=50" +else + echo -e "${YELLOW}⚠️ Skipping coverage (pytest-cov not installed)${NC}\n" fi # 5. Linting with flake8 @@ -90,7 +92,16 @@ run_test "CLI Help Test" "python -m vllm_cli --help > /dev/null" # 12. Validate pyproject.toml if [ -f "pyproject.toml" ]; then - run_test "Validate pyproject.toml" "python -c 'import toml; toml.load(\"pyproject.toml\"); print(\"pyproject.toml is valid\")'" + run_test "Validate pyproject.toml" "python -c ' +try: + import tomllib + with open(\"pyproject.toml\", \"rb\") as f: + tomllib.load(f) +except ImportError: + import toml + toml.load(\"pyproject.toml\") +print(\"pyproject.toml is valid\") +'" fi # Summary