From ed8694c67f91f4f901344275675700882f5f0d38 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 22 Jun 2026 16:52:09 +0200 Subject: [PATCH] test(train): skip remote-dispatch tests without the dataset extra The module imports lerobot.scripts.lerobot_train, which eagerly pulls in lerobot.datasets (dataset extra). The base fast-test CI tier runs without that extra, so collection failed there. Guard with pytest.importorskip, matching the existing tests/scripts dataset-extra tests. --- tests/scripts/test_train_remote_dispatch.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/scripts/test_train_remote_dispatch.py b/tests/scripts/test_train_remote_dispatch.py index 3b634b563..841bc798a 100644 --- a/tests/scripts/test_train_remote_dispatch.py +++ b/tests/scripts/test_train_remote_dispatch.py @@ -15,10 +15,17 @@ import sys import draccus +import pytest -from lerobot.configs.train import TrainPipelineConfig -from lerobot.policies.act.configuration_act import ACTConfig # noqa: F401 (registers --policy.type act) -from lerobot.scripts.lerobot_train import _remote_target_in_argv, train +# Importing lerobot_train eagerly pulls in lerobot.datasets, which needs the +# `dataset` extra. The base CI tier runs without it, so skip the whole module there. +pytest.importorskip("datasets", reason="datasets is required (install lerobot[dataset])") + +from lerobot.configs.train import TrainPipelineConfig # noqa: E402 +from lerobot.policies.act.configuration_act import ( + ACTConfig, # noqa: E402, F401 (registers --policy.type act) +) +from lerobot.scripts.lerobot_train import _remote_target_in_argv, train # noqa: E402 def _set_argv(monkeypatch, *args):