Merge branch 'main' into feat/audio_dataset

This commit is contained in:
CarolinePascal
2026-04-01 17:16:58 +02:00
351 changed files with 26219 additions and 7470 deletions
+18 -1
View File
@@ -21,9 +21,10 @@ import pytest
import torch
from lerobot import available_cameras, available_microphones, available_motors, available_robots
from lerobot.utils.device_utils import auto_select_torch_device
from lerobot.utils.import_utils import is_package_available
DEVICE = os.environ.get("LEROBOT_TEST_DEVICE", "cuda") if torch.cuda.is_available() else "cpu"
DEVICE = os.environ.get("LEROBOT_TEST_DEVICE", str(auto_select_torch_device()))
TEST_ROBOT_TYPES = []
for robot_type in available_robots:
@@ -114,6 +115,22 @@ def require_cuda(func):
return wrapper
def require_hf_token(func):
"""
Decorator that skips the test if no Hugging Face Hub token is available.
"""
@wraps(func)
def wrapper(*args, **kwargs):
from huggingface_hub import get_token
if get_token() is None:
pytest.skip("requires HF token for gated model access")
return func(*args, **kwargs)
return wrapper
def require_env(func):
"""
Decorator that skips the test if the required environment package is not installed.