From 7471a6b1ed9f1d58196e4bbda693c91ae0622f43 Mon Sep 17 00:00:00 2001 From: Pepijn Date: Thu, 4 Jun 2026 14:12:04 +0200 Subject: [PATCH] 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) --- pyproject.toml | 25 +++++++++---------------- tests/annotations/conftest.py | 11 ++++------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dce61758c..1b65aa664 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/tests/annotations/conftest.py b/tests/annotations/conftest.py index 198e90319..69e0d595e 100644 --- a/tests/annotations/conftest.py +++ b/tests/annotations/conftest.py @@ -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