fix(tests): gate RL tests on the datasets extra

This commit is contained in:
Khalil Meftah
2026-04-27 16:53:34 +02:00
parent 577f14337a
commit e298474bf3
6 changed files with 50 additions and 30 deletions
+10 -6
View File
@@ -14,13 +14,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import torch
from torch import Tensor
import pytest
from lerobot.rl.algorithms.base import RLAlgorithm
from lerobot.rl.algorithms.configs import TrainingStats
from lerobot.rl.trainer import RLTrainer
from lerobot.utils.constants import ACTION, OBS_STATE
pytest.importorskip("datasets", reason="datasets is required (install lerobot[dataset])")
import torch # noqa: E402
from torch import Tensor # noqa: E402
from lerobot.rl.algorithms.base import RLAlgorithm # noqa: E402
from lerobot.rl.algorithms.configs import TrainingStats # noqa: E402
from lerobot.rl.trainer import RLTrainer # noqa: E402
from lerobot.utils.constants import ACTION, OBS_STATE # noqa: E402
class _DummyRLAlgorithmConfig: