fix: three issues found while running the untested paths after merge - #12
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validation pass against
mainafter PR #11 merged. Three real bugs surfaced from actually running the things I'd flagged as untested.1.
fix(deps): pin huggingface-hub<1.0 for transformers 4.x compatibilityAfter
uv syncagainst the mergedmain, vLLM imports crash with:Root cause:
constraints/serve.txtpinstransformers<5.0(because vLLM 0.11 callsQwen2Tokenizer.all_special_tokens_extendedwhich 5.x removed), and transformers 4.x in turn requireshuggingface-hub<1.0. Butgradio(added in PR #9) pulledhuggingface-hub==1.16.1intouv.lock. The lock + the constraint contradicted each other.Fix: pin
huggingface-hub<1.0inpyproject.tomlso the lock is coherent with the runtime constraint. Verified:uv pip install -c constraints/serve.txt vllm transformers→ vllm 0.11.0 + transformers 4.57.6 + huggingface-hub 0.36.2make rehearseruns end-to-end cleanly2.
fix(hf-spaces): move theme to launch() for gradio 6.0 compatibilityLaunched the HF Spaces app for real (
OPENAI_BASE_URL=http://localhost:8000/v1 python deploy/hf-spaces/app.py) against vLLM CPU. App ran and streamed correctly, but logged:Trivial fix: pass
theme=gr.themes.Soft()to.launch()instead ofgr.Blocks(...).While there I also verified the
include_usagetoken-counting path the user added infix(hf-spaces): report chunk-level metrics...works against real vLLM: 3 SSE chunks for 4 completion tokens, TTFT 2075 ms (cold CPU), TPOT 14.1 ms.3.
fix(docker): install into base image python; skip redundant vllm reinstalldocker buildx build --platform linux/amd64 -f Dockerfile .failed at theuv pip install -c constraints/serve.txt vllm transformersstep with a transientxformers==0.0.33.post1download timeout.Root cause: the old Dockerfile created a second venv via
uv syncthat didn't include vLLM, then reinstalled vLLM into the venv from constraints — re-downloading the entire CUDA stack (xformers + nvidia-* wheels, ~3 GB). The reinstall is redundant: the base imagevllm/vllm-openai:latestalready has vLLM + its CUDA deps installed.Fix: drop the second venv. Use
uv pip install --system .to install Forge + its small project deps directly into the base image's Python, thenuv pip install --system -c constraints/serve.txt transformers(~11 MB) to enforce the transformers pin.Verified:
docker buildx build --platform linux/amd64 -f Dockerfile .now completes cleanly, produces a 24.5 GB image (vs the previous timeout), and the transformers pin gets applied (5.8.1 → 4.57.6).Other validations done in this pass
docker compose up -d prometheus grafanabrings up both services; the Forge dashboard appears under "Forge" folder; the Prometheus datasource auto-wires. PromQL queries from the dashboard (vllm:num_requests_running,histogram_quantile(0.5, sum(rate(vllm:time_to_first_token_seconds_bucket[1m])) by (le))) resolve syntactically — no error annotations, just empty results because no vLLM traffic is hitting Prometheus yet. The user'sfix(monitoring): move grafana dashboards mount off provisioning pathworks correctly.What's still untested
Only Phase 7 (paid RunPod run) remains untested — that one requires actual GPU rental.