Skip to content

Commit 19e67de

Browse files
davanstrienclaude
andauthored
video: let the vLLM image provide vllm in marlin-caption.py (#176)
marlin-caption.py listed vllm in its PEP 723 dependencies while running on vllm/vllm-openai:v0.32.0 with PYTHONPATH pointed at the image's packages. saturate starts `vllm serve` from PATH, and uv puts the env's newer PyPI vllm CLI first. That CLI imports the image's vllm (PYTHONPATH), which imports the top-level b12x module from the env's flashinfer-python 0.7.2.post1. The image lacks the matching flashinfer file, so the server fails with FileNotFoundError: flashinfer/experimental/b12x/_api.py. Drop vllm from the header so `vllm serve` resolves to the image's own CLI, and say why in a header comment. The local GPU example now says `uv run --with vllm`. README: pin the Jobs examples to the header's tested image (v0.32.0) instead of :latest. Claude-Session: https://claude.ai/code/session_016isSPp2RigRhXpgWLSJRuk Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 218223e commit 19e67de

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎video/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Scripts run directly from their Hub URL — no clone or local checkout needed:
2222

2323
```bash
2424
# Caption every video in a bucket: dense scene captions + timestamped events
25-
hf jobs uv run --image vllm/vllm-openai:latest --flavor a10g-small \
25+
hf jobs uv run --image vllm/vllm-openai:v0.32.0 --flavor a10g-small \
2626
-s HF_TOKEN \
2727
-v hf://buckets/user/my-videos:/input:ro \
2828
https://huggingface.co/datasets/uv-scripts/video/raw/main/marlin-caption.py \
2929
/input hf://buckets/user/my-videos/captions
3030

3131
# Temporal grounding: when does an event happen?
32-
hf jobs uv run --image vllm/vllm-openai:latest --flavor a10g-small \
32+
hf jobs uv run --image vllm/vllm-openai:v0.32.0 --flavor a10g-small \
3333
-s HF_TOKEN \
3434
-v hf://buckets/user/my-videos:/input:ro \
3535
https://huggingface.co/datasets/uv-scripts/video/raw/main/marlin-caption.py \

‎video/marlin-caption.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
# requires-python = ">=3.11"
33
# dependencies = [
44
# "saturate[hf]==0.3.0",
5-
# "vllm",
65
# "qwen-vl-utils",
76
# ]
87
#
98
# [tool.hf-jobs]
9+
# # vllm comes from the image: saturate starts `vllm serve` from PATH. Listing vllm above puts a
10+
# # newer PyPI vllm CLI first on PATH, and its flashinfer-python dependency (0.7.2.post1) ships a
11+
# # top-level b12x module that the image lacks. The image's vllm (via PYTHONPATH) imports it and
12+
# # crashes (missing flashinfer/experimental/b12x/_api.py). Seen on v0.32.0 (2026-11-05);
13+
# # re-test before moving the tag. Local GPU: uv run --with vllm.
1014
# image = "vllm/vllm-openai:v0.32.0"
1115
# python = "/usr/bin/python3"
1216
# env = { PYTHONPATH = "/usr/local/lib/python3.12/dist-packages" }
@@ -52,8 +56,8 @@
5256
spans as a shortlist to rank or verify downstream — when the event is really there,
5357
they are precise (matches caption-mode events to the half-second in testing).
5458
55-
# Local machine with a CUDA GPU
56-
uv run marlin-caption.py ./videos ./captions-out
59+
# Local machine with a CUDA GPU (the header leaves vllm to the HF Jobs image)
60+
uv run --with vllm marlin-caption.py ./videos ./captions-out
5761
5862
Memory safety (learned the hard way — defaults encode a measured config):
5963
* --mm-processor-cache-gb 0 is passed to vLLM: its multimodal cache grows without

0 commit comments

Comments
 (0)