From d0134f980fb70fc3221f8d6f1a021f3d2aaf53e2 Mon Sep 17 00:00:00 2001 From: Omar Younis <42100908+younik@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:22:03 +0200 Subject: [PATCH] bump version (#235) --- .github/workflows/test-integrations.yml | 16 ++++++++++------ docs/_scripts/generate_gif.py | 4 ++-- minari/__init__.py | 10 ++++++++-- pyproject.toml | 3 +++ tests/integrations/test_agile_rl.py | 10 ++++++++-- tests/integrations/test_torch_rl.py | 5 ++++- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-integrations.yml b/.github/workflows/test-integrations.yml index 6f8381c2..169bd245 100644 --- a/.github/workflows/test-integrations.yml +++ b/.github/workflows/test-integrations.yml @@ -13,9 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: | - docker build -f bin/Dockerfile \ - --build-arg PYTHON_VERSION=3.11 \ - --tag minari-docker . - - name: Run tests - run: docker run minari-docker pytest tests/integrations + + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install Minari + run: pip install .[all,testing,integrations] + + - name: Run integration tests + run: pytest tests/integrations diff --git a/docs/_scripts/generate_gif.py b/docs/_scripts/generate_gif.py index 482a9a1f..40b1b90b 100644 --- a/docs/_scripts/generate_gif.py +++ b/docs/_scripts/generate_gif.py @@ -9,8 +9,8 @@ FLAGS = flags.FLAGS flags.DEFINE_string("dataset_id", None, "Dataset ID") flags.DEFINE_string("path", None, "Path to save the gif") -flags.DEFINE_integer("num_frames", 256, "Number of frames in the gif") -flags.DEFINE_integer("fps", 16, "Frames per second in the gif") +flags.DEFINE_integer("num_frames", 512, "Number of frames in the gif") +flags.DEFINE_integer("fps", 32, "Frames per second in the gif") def _space_at(values, index): diff --git a/minari/__init__.py b/minari/__init__.py index 010c2be9..251fc0d2 100644 --- a/minari/__init__.py +++ b/minari/__init__.py @@ -39,5 +39,11 @@ "get_normalized_score", ] -__version__ = "0.4.3" -supported_dataset_versions = {"0.4.0", "0.4.1", "0.4.2", "0.4.3"} +__version__ = "0.5.0" +supported_dataset_versions = { + "0.4.0", + "0.4.1", + "0.4.2", + "0.4.3", + "0.5.0", +} diff --git a/pyproject.toml b/pyproject.toml index 1397349d..94ac57c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,9 @@ testing = [ "pytest>=7.1.3", "gymnasium-robotics>=1.2.3", "mktestdocs", +] + +integrations = [ "torchrl", "agilerl" ] diff --git a/tests/integrations/test_agile_rl.py b/tests/integrations/test_agile_rl.py index b3843a59..4a5fea20 100644 --- a/tests/integrations/test_agile_rl.py +++ b/tests/integrations/test_agile_rl.py @@ -1,14 +1,20 @@ import gymnasium as gym import h5py import pytest -from agilerl.components.replay_buffer import ReplayBuffer -from agilerl.utils.minari_utils import minari_to_agile_buffer, minari_to_agile_dataset import minari from minari import DataCollector from tests.common import create_dummy_dataset_with_collecter_env_helper +pytest.importorskip("agile_rl") +from agilerl.components.replay_buffer import ReplayBuffer # noqa: E402 +from agilerl.utils.minari_utils import ( # noqa: E402 + minari_to_agile_buffer, + minari_to_agile_dataset, +) + + @pytest.fixture(name="dataset_id") def dataset_id(): return "cartpole/test-v0" diff --git a/tests/integrations/test_torch_rl.py b/tests/integrations/test_torch_rl.py index 1fb1c09d..6df3d2c5 100644 --- a/tests/integrations/test_torch_rl.py +++ b/tests/integrations/test_torch_rl.py @@ -1,6 +1,9 @@ import gymnasium as gym import pytest -from torchrl.data.datasets.minari_data import MinariExperienceReplay + + +pytest.importorskip("torchrl") +from torchrl.data.datasets.minari_data import MinariExperienceReplay # noqa: E402 def test_torch_minari_experience_replay():