mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 18:26:11 +00:00
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:
+9
-16
@@ -222,26 +222,19 @@ hilserl = ["lerobot[transformers-dep]", "lerobot[dataset]", "gym-hil>=0.1.13,<0.
|
|||||||
async = ["lerobot[grpcio-dep]", "lerobot[matplotlib-dep]"]
|
async = ["lerobot[grpcio-dep]", "lerobot[matplotlib-dep]"]
|
||||||
peft = ["lerobot[transformers-dep]", "lerobot[peft-dep]"]
|
peft = ["lerobot[transformers-dep]", "lerobot[peft-dep]"]
|
||||||
|
|
||||||
# Annotation pipeline (lerobot-annotate). vllm is the preferred backend
|
# Annotation pipeline (lerobot-annotate). The only backend is ``openai``,
|
||||||
# on Linux, with a transformers fallback elsewhere; openai is the default
|
# which talks to any OpenAI-compatible server (``vllm serve`` /
|
||||||
# backend and talks to any OpenAI-compatible server (``vllm serve`` /
|
# ``transformers serve`` / hosted). Distributed runs use Hugging Face Jobs
|
||||||
# ``transformers serve`` / hosted endpoints). Distributed execution is
|
# (see examples/annotations/run_hf_job.py).
|
||||||
# delegated to Hugging Face Jobs (see examples/annotations/run_hf_job.py).
|
|
||||||
annotations = [
|
annotations = [
|
||||||
"lerobot[dataset]",
|
"lerobot[dataset]",
|
||||||
"lerobot[transformers-dep]",
|
"lerobot[transformers-dep]",
|
||||||
"openai>=1.40,<2.0",
|
"openai>=1.40,<2.0",
|
||||||
# NOTE: ``vllm`` is intentionally NOT a hard dependency here. vLLM
|
# ``vllm`` is intentionally NOT a hard dep: it pins an older torch, and
|
||||||
# hard-pins an older torch (via xformers/xgrammar), and because uv
|
# uv's single unified lock would then cap ``torch`` for every extra
|
||||||
# resolves a single unified lock across all extras, including it would
|
# (e.g. forcing 2.8 while ``torchcodec`` in [dataset] needs 2.11 -> ABI
|
||||||
# cap ``torch`` for every other extra too (e.g. forcing torch 2.8 while
|
# break in CI). The HF Jobs image (``vllm/vllm-openai``) provides vLLM;
|
||||||
# ``torchcodec`` in the ``dataset`` extra needs torch 2.11 -> ABI break
|
# install it locally only if you run your own ``vllm serve``.
|
||||||
# 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.
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|||||||
@@ -26,13 +26,10 @@ from pathlib import Path
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
# NOTE: ``build_annotation_dataset`` pulls in ``lerobot.datasets`` (-> the HF
|
# ``build_annotation_dataset`` pulls in ``lerobot.datasets`` (HF ``datasets``
|
||||||
# ``datasets`` library + ``pandas``), which only ship under the ``dataset``
|
# + ``pandas``, only in the ``dataset`` extra), so it's imported lazily inside
|
||||||
# extra. It is imported LAZILY inside the fixtures below so this conftest
|
# each fixture — this conftest stays importable without that extra. The test
|
||||||
# imports cleanly in dependency tiers without that extra (e.g. the base
|
# modules ``pytest.importorskip("datasets")`` so they skip rather than error.
|
||||||
# ``--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.
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
Reference in New Issue
Block a user