annotate: compress conftest + pyproject comments (fix stale backend note)

The pyproject annotations-extra comment still described the removed
vllm/transformers in-process backends ('vllm preferred ... transformers
fallback', '_make_vllm_client'); rewrite it for the openai-only reality
and trim it. Also condense the conftest lazy-import NOTE. Comments only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-06-04 14:12:04 +02:00
parent 20c7a12dd5
commit 7471a6b1ed
2 changed files with 13 additions and 23 deletions
+9 -16
View File
@@ -222,26 +222,19 @@ hilserl = ["lerobot[transformers-dep]", "lerobot[dataset]", "gym-hil>=0.1.13,<0.
async = ["lerobot[grpcio-dep]", "lerobot[matplotlib-dep]"]
peft = ["lerobot[transformers-dep]", "lerobot[peft-dep]"]
# Annotation pipeline (lerobot-annotate). vllm is the preferred backend
# on Linux, with a transformers fallback elsewhere; openai is the default
# backend and talks to any OpenAI-compatible server (``vllm serve`` /
# ``transformers serve`` / hosted endpoints). Distributed execution is
# delegated to Hugging Face Jobs (see examples/annotations/run_hf_job.py).
# Annotation pipeline (lerobot-annotate). The only backend is ``openai``,
# which talks to any OpenAI-compatible server (``vllm serve`` /
# ``transformers serve`` / hosted). Distributed runs use Hugging Face Jobs
# (see examples/annotations/run_hf_job.py).
annotations = [
"lerobot[dataset]",
"lerobot[transformers-dep]",
"openai>=1.40,<2.0",
# NOTE: ``vllm`` is intentionally NOT a hard dependency here. vLLM
# hard-pins an older torch (via xformers/xgrammar), and because uv
# resolves a single unified lock across all extras, including it would
# cap ``torch`` for every other extra too (e.g. forcing torch 2.8 while
# ``torchcodec`` in the ``dataset`` extra needs torch 2.11 -> ABI break
# in CI). vLLM is also not needed by the shipped workflow: the HF Jobs
# launcher (``examples/annotations/run_hf_job.py``) gets it from the
# ``vllm/vllm-openai`` image and talks to it over the OpenAI-compatible
# API (``--vlm.backend=openai``), and ``vlm_client._make_vllm_client``
# imports vllm lazily with an actionable error. To use the in-process
# ``--vlm.backend=vllm`` locally, ``pip install vllm`` separately.
# ``vllm`` is intentionally NOT a hard dep: it pins an older torch, and
# uv's single unified lock would then cap ``torch`` for every extra
# (e.g. forcing 2.8 while ``torchcodec`` in [dataset] needs 2.11 -> ABI
# break in CI). The HF Jobs image (``vllm/vllm-openai``) provides vLLM;
# install it locally only if you run your own ``vllm serve``.
]
# Development
+4 -7
View File
@@ -26,13 +26,10 @@ from pathlib import Path
import pytest
# NOTE: ``build_annotation_dataset`` pulls in ``lerobot.datasets`` (-> the HF
# ``datasets`` library + ``pandas``), which only ship under the ``dataset``
# extra. It is imported LAZILY inside the fixtures below so this conftest
# imports cleanly in dependency tiers without that extra (e.g. the base
# ``--extra test`` fast-test tier). The annotation test modules guard
# themselves with a module-level ``pytest.importorskip("datasets")`` so
# their collection is skipped — never erroring — when the extra is absent.
# ``build_annotation_dataset`` pulls in ``lerobot.datasets`` (HF ``datasets``
# + ``pandas``, only in the ``dataset`` extra), so it's imported lazily inside
# each fixture — this conftest stays importable without that extra. The test
# modules ``pytest.importorskip("datasets")`` so they skip rather than error.
@pytest.fixture