mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 03:59:42 +00:00
fix: peft test import
This commit is contained in:
@@ -19,21 +19,28 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import torch
|
|
||||||
|
|
||||||
# Skip this entire module in CI
|
try:
|
||||||
|
import peft # noqa: F401
|
||||||
|
WALLX_AVAILABLE = True
|
||||||
|
except ImportError:
|
||||||
|
WALLX_AVAILABLE = False
|
||||||
|
|
||||||
|
# Skip this entire module if wallx deps not available or in CI
|
||||||
pytestmark = pytest.mark.skipif(
|
pytestmark = pytest.mark.skipif(
|
||||||
os.environ.get("CI") == "true" or os.environ.get("GITHUB_ACTIONS") == "true",
|
not WALLX_AVAILABLE or os.environ.get("CI") == "true" or os.environ.get("GITHUB_ACTIONS") == "true",
|
||||||
reason="This test requires local Wall-X installation and is not meant for CI",
|
reason="This test requires Wall-X dependencies (peft) and is not meant for CI",
|
||||||
)
|
)
|
||||||
|
|
||||||
from lerobot.policies.factory import make_policy_config # noqa: E402
|
if WALLX_AVAILABLE:
|
||||||
from lerobot.policies.wall_x import ( # noqa: E402
|
import torch
|
||||||
WallXConfig,
|
from lerobot.policies.factory import make_policy_config
|
||||||
WallXPolicy,
|
from lerobot.policies.wall_x import (
|
||||||
make_wall_x_pre_post_processors,
|
WallXConfig,
|
||||||
)
|
WallXPolicy,
|
||||||
from lerobot.utils.random_utils import set_seed # noqa: E402
|
make_wall_x_pre_post_processors,
|
||||||
|
)
|
||||||
|
from lerobot.utils.random_utils import set_seed
|
||||||
|
|
||||||
|
|
||||||
def test_policy_instantiation():
|
def test_policy_instantiation():
|
||||||
|
|||||||
Reference in New Issue
Block a user