mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 18:26:11 +00:00
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.
This commit is contained in:
@@ -15,10 +15,17 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import draccus
|
import draccus
|
||||||
|
import pytest
|
||||||
|
|
||||||
from lerobot.configs.train import TrainPipelineConfig
|
# Importing lerobot_train eagerly pulls in lerobot.datasets, which needs the
|
||||||
from lerobot.policies.act.configuration_act import ACTConfig # noqa: F401 (registers --policy.type act)
|
# `dataset` extra. The base CI tier runs without it, so skip the whole module there.
|
||||||
from lerobot.scripts.lerobot_train import _remote_target_in_argv, train
|
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):
|
def _set_argv(monkeypatch, *args):
|
||||||
|
|||||||
Reference in New Issue
Block a user