diff --git a/tests/policies/test_sac_policy.py b/tests/policies/test_sac_policy.py index 784ec2fc8..43544acf1 100644 --- a/tests/policies/test_sac_policy.py +++ b/tests/policies/test_sac_policy.py @@ -15,6 +15,9 @@ # limitations under the License. import pytest + +pytest.importorskip("grpc") + import torch from torch import Tensor, nn diff --git a/tests/rl/test_data_mixer.py b/tests/rl/test_data_mixer.py index 90e9e492f..113cb87c8 100644 --- a/tests/rl/test_data_mixer.py +++ b/tests/rl/test_data_mixer.py @@ -13,6 +13,10 @@ # limitations under the License. """Tests for RL data mixing (DataMixer, OnlineOfflineMixer).""" +import pytest + +pytest.importorskip("grpc") + import torch from lerobot.rl.buffer import ReplayBuffer diff --git a/tests/rl/test_sac_algorithm.py b/tests/rl/test_sac_algorithm.py index 325c9727b..6ef3e3ddf 100644 --- a/tests/rl/test_sac_algorithm.py +++ b/tests/rl/test_sac_algorithm.py @@ -16,6 +16,9 @@ """Tests for the RL algorithm abstraction and SACAlgorithm implementation.""" import pytest + +pytest.importorskip("grpc") + import torch from lerobot.configs.types import FeatureType, PolicyFeature diff --git a/tests/rl/test_trainer.py b/tests/rl/test_trainer.py index 47eaf6ad3..985ab9a6b 100644 --- a/tests/rl/test_trainer.py +++ b/tests/rl/test_trainer.py @@ -14,6 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pytest + +pytest.importorskip("grpc") + import torch from torch import Tensor