From 83014e5639702dfd9051e088f6b048280ef961b2 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 6 Apr 2024 15:43:27 +0200 Subject: [PATCH 01/36] Update to 1.0.0 alpha1 --- recipe/meta.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 11dd07e..e08c3fe 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,18 +1,15 @@ -{% set version = "0.29.1" %} +{% set version = "1.0.0" %} package: name: gymnasium-split version: {{ version }} source: - url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}.tar.gz + url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a1.tar.gz sha256: 0bff5ff33335ffe170f9ccba544f7c4d78e7b4dd883337f2ee00f8ba3c6d85b5 - patches: - # https://github.com/Farama-Foundation/Gymnasium/pull/932 - - patches/932.patch build: - number: 1 + number: 0 # Need these up here for conda-smithy to handle them properly. requirements: @@ -146,9 +143,7 @@ outputs: - python - {{ pin_subpackage('gymnasium', exact=True) }} - cython <3 - # Maximum version of mujoco constraint required due to https://github.com/Farama-Foundation/Gymnasium/issues/749#issuecomment-1808355111, - # remove once gymnasium v1.0.0 is released - - mujoco-python >=2.3.3,<3.0.0 + - mujoco-python >=2.3.3 - imageio >=2.14.1 test: imports: From ed69344f1860d08c236718a2c63637ea51a6334a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 6 Apr 2024 15:51:22 +0200 Subject: [PATCH 02/36] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e08c3fe..fba2254 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,7 +6,7 @@ package: source: url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a1.tar.gz - sha256: 0bff5ff33335ffe170f9ccba544f7c4d78e7b4dd883337f2ee00f8ba3c6d85b5 + sha256: ef293c16f289ae0190a5d61e64e84ce2943f4b4da8019d33df0a079f4d6583e3 build: number: 0 From 17f53447f8699f78feb98f436406aec0db226c8f Mon Sep 17 00:00:00 2001 From: Mark Towers Date: Sat, 6 Apr 2024 15:21:48 +0100 Subject: [PATCH 03/36] Update requirement list --- recipe/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fba2254..286960e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -44,7 +44,6 @@ outputs: - cloudpickle >=1.2.0 - farama-notifications - numpy - - jax-jumpy >=1.0.0 - typing_extensions >=4.3.0 - importlib_metadata >=4.8.1 # [py<=39] test: @@ -69,11 +68,14 @@ outputs: source_files: - tests/ requires: + - pip - mock - pytest - scipy - - pip + - dill - jax >=0.4 # [osx or linux64] + - flax # [osx or linus64] + - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] commands: - pip check @@ -189,7 +191,6 @@ outputs: - matplotlib >=3.0 - moviepy >=1.0 - py-opencv >=3.0 - - pytorch >=1.0 # [unix and not ppc64le] test: imports: # There are no tests in the source code for gymnasium-other From ee7c5556c1662a6b82fe663aa61a0c08f64e6c46 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 6 Apr 2024 16:24:36 +0200 Subject: [PATCH 04/36] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 286960e..cd20cd6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -74,7 +74,7 @@ outputs: - scipy - dill - jax >=0.4 # [osx or linux64] - - flax # [osx or linus64] + - flax # [osx or linux64] - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] commands: From c7ba3fddf7bae56a7db7841da1a7508c79dd2ab1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 8 Apr 2024 23:19:56 +0200 Subject: [PATCH 05/36] Remove cython dependency from gymnasium-mujoco --- recipe/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cd20cd6..25d8527 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -144,7 +144,6 @@ outputs: run: - python - {{ pin_subpackage('gymnasium', exact=True) }} - - cython <3 - mujoco-python >=2.3.3 - imageio >=2.14.1 test: From 77b14383bc928d3ff253d7c60a550dd5c7761748 Mon Sep 17 00:00:00 2001 From: Mark Towers Date: Tue, 21 May 2024 11:06:21 +0100 Subject: [PATCH 06/36] Update for Alpha 2 --- recipe/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 25d8527..97cb14e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -5,8 +5,8 @@ package: version: {{ version }} source: - url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a1.tar.gz - sha256: ef293c16f289ae0190a5d61e64e84ce2943f4b4da8019d33df0a079f4d6583e3 + url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a2.tar.gz + sha256: e9f7967b71d177f2183ab4f0afc2c7c73a2bae3be2028b703363820469c22b34 build: number: 0 @@ -106,10 +106,10 @@ outputs: run: - python - {{ pin_subpackage('gymnasium', exact=True) }} - - shimmy-atari + - ale-py test: commands: - - echo "tested in shimmy-atari" + - echo "tested in ale-py" - name: gymnasium-box2d requirements: From ab677e9b2436016880b8070ae00be7f6fe54c004 Mon Sep 17 00:00:00 2001 From: Mark Towers Date: Tue, 21 May 2024 11:21:44 +0100 Subject: [PATCH 07/36] Fix sha256 --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 97cb14e..be4577e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,7 +6,7 @@ package: source: url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a2.tar.gz - sha256: e9f7967b71d177f2183ab4f0afc2c7c73a2bae3be2028b703363820469c22b34 + sha256: 8e05eb7b41aaa2c7cd2fca7fc8f380ca38a814a5fdc67d9ce8614e5014c90683 build: number: 0 From d41a48ea7599acba8cc30b219ef675b849ecc1c0 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 21 May 2024 23:03:57 +0200 Subject: [PATCH 08/36] Create 1060.patch --- recipe/1060.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 recipe/1060.patch diff --git a/recipe/1060.patch b/recipe/1060.patch new file mode 100644 index 0000000..0110112 --- /dev/null +++ b/recipe/1060.patch @@ -0,0 +1,44 @@ +From c72daa87f6eebf7a14057ab7e70ed8c74d021a4a Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Tue, 21 May 2024 22:59:48 +0200 +Subject: [PATCH] mujoco_py_env: Only raise an exception if MuJocoPyEnv class + is actually used + +--- + gymnasium/envs/mujoco/mujoco_py_env.py | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/gymnasium/envs/mujoco/mujoco_py_env.py b/gymnasium/envs/mujoco/mujoco_py_env.py +index 8d2949102..a15ac7a5a 100644 +--- a/gymnasium/envs/mujoco/mujoco_py_env.py ++++ b/gymnasium/envs/mujoco/mujoco_py_env.py +@@ -12,11 +12,9 @@ + try: + import mujoco_py + except ImportError as e: +- raise error.DependencyNotInstalled( +- "Could not import mujoco_py, which is needed for MuJoCo environments older than V4", +- "You could either use a newer version of the environments, or install the (deprecated) mujoco-py package" +- "following the instructions on their GitHub page.", +- ) from e ++ MUJOCO_PY_IMPORT_ERROR = e ++else: ++ MUJOCO_PY_IMPORT_ERROR = None + + + # NOTE: duplication of analogous code in mujoco_env.py +@@ -214,6 +212,14 @@ def __init__( + camera_id: Optional[int] = None, + camera_name: Optional[str] = None, + ): ++ if MUJOCO_PY_IMPORT_ERROR is not None: ++ raise error.DependencyNotInstalled( ++ f"{MUJOCO_PY_IMPORT_ERROR}. " ++ "Could not import mujoco_py, which is needed for MuJoCo environments older than V4", ++ "You could either use a newer version of the environments, or install the (deprecated) mujoco-py package" ++ "following the instructions on their GitHub page.", ++ ) ++ + logger.deprecation( + "This version of the mujoco environments depends " + "on the mujoco-py bindings, which are no longer maintained " From c5f0fa1e06ec12021126965fb745c9b253a1d392 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 21 May 2024 23:04:13 +0200 Subject: [PATCH 09/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index be4577e..c0cdde9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,6 +7,8 @@ package: source: url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a2.tar.gz sha256: 8e05eb7b41aaa2c7cd2fca7fc8f380ca38a814a5fdc67d9ce8614e5014c90683 + patches: + - 1060.patch build: number: 0 From c49cc077d1910433e39eb29ace520646a386d2bd Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 09:51:11 +0200 Subject: [PATCH 10/36] Update meta.yaml --- recipe/meta.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c0cdde9..78a33cd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -82,6 +82,17 @@ outputs: commands: - pip check {% set tests_to_skip = "_not_a_real_test" %} + # This test requires mujoco_py, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124082918 + {% set tests_to_skip = tests_to_skip + " or test_verify_info_x_position" %} + {% set tests_to_skip = tests_to_skip + " or test_verify_info_y_position" %} + {% set tests_to_skip = tests_to_skip + " or test_verify_info_x_velocity" %} + {% set tests_to_skip = tests_to_skip + " or test_verify_info_y_velocity" %} + {% set tests_to_skip = tests_to_skip + " or test_verify_info_xy_velocity_xpos" %} + {% set tests_to_skip = tests_to_skip + " or test_verify_info_xy_velocity_com" %} + {% set tests_to_skip = tests_to_skip + " or test_set_state" %} + {% set tests_to_skip = tests_to_skip + " or test_distance_from_origin_info" %} + {% set tests_to_skip = tests_to_skip + " or test_model_sensors" %} + {% set tests_to_skip = tests_to_skip + " or test_reset_noise_scale" %} # the following pygame tests are skipped [according to selector], because there is no rendering support during the CI build {% set tests_to_skip = tests_to_skip + " or test_human_rendering" %} # [osx] {% set tests_to_skip = tests_to_skip + " or test_keyboard_irrelevant_keydown_event" %} # [osx] From 8f263ef40f04f07938648027ba580c78e329094d Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 11:54:51 +0200 Subject: [PATCH 11/36] Update meta.yaml --- recipe/meta.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 78a33cd..7b737d5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -82,7 +82,7 @@ outputs: commands: - pip check {% set tests_to_skip = "_not_a_real_test" %} - # This test requires mujoco_py, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124082918 + # These test requires mujoco_py, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124082918 {% set tests_to_skip = tests_to_skip + " or test_verify_info_x_position" %} {% set tests_to_skip = tests_to_skip + " or test_verify_info_y_position" %} {% set tests_to_skip = tests_to_skip + " or test_verify_info_x_velocity" %} @@ -93,6 +93,11 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_distance_from_origin_info" %} {% set tests_to_skip = tests_to_skip + " or test_model_sensors" %} {% set tests_to_skip = tests_to_skip + " or test_reset_noise_scale" %} + # These tests do not run on CI due to missing window system, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124183361 + {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute[10-human]" %} + {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute[100-human]" %} + {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute[1000-human]" %} + {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute[10000-human]" %} # the following pygame tests are skipped [according to selector], because there is no rendering support during the CI build {% set tests_to_skip = tests_to_skip + " or test_human_rendering" %} # [osx] {% set tests_to_skip = tests_to_skip + " or test_keyboard_irrelevant_keydown_event" %} # [osx] From 9daa0a0d0fed47861138f397b2aaa69148ee0d92 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 11:57:41 +0200 Subject: [PATCH 12/36] Update meta.yaml --- recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7b737d5..41fcc07 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -80,7 +80,8 @@ outputs: - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] commands: - - pip check + # On Python 3.8 do not do pip check, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124179635 + - pip check # [py != 38] {% set tests_to_skip = "_not_a_real_test" %} # These test requires mujoco_py, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124082918 {% set tests_to_skip = tests_to_skip + " or test_verify_info_x_position" %} From dbafe3f34445e52a93e86d6fb39cc6a0d098862c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 12:49:49 +0200 Subject: [PATCH 13/36] Update meta.yaml --- recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 41fcc07..6694419 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -111,7 +111,8 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_play_relevant_keys" %} # [osx] {% set tests_to_skip = tests_to_skip + " or test_pygame_quit_event" %} # [osx] {% set tests_to_skip = tests_to_skip + " or test_video_size_no_zoom" %} # [osx] - {% set tests_to_skip = tests_to_skip + " or test_video_size_zoom" %} # [osx] + {% set tests_to_skip = tests_to_skip + " or test_offscreen_viewer_custom_dimensions" %} # [osx] + {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute" %} # [osx] # See https://github.com/conda-forge/gymnasium-feedstock/pull/32#issuecomment-2031810613 {% set tests_to_skip = tests_to_skip + " or test_render_modes" %} # [aarch64] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo From 968aea0de2656fb7c98bbe1037a1fe9e1c1010b6 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 14:44:54 +0200 Subject: [PATCH 14/36] Update meta.yaml --- recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6694419..43936f8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -117,6 +117,9 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_render_modes" %} # [aarch64] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo - export MUJOCO_GL="osmesa" # [linux] + # Ensure that pygame tests pass on osx, + # see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124699477 + - export SDL_VIDEODRIVER="dummy" # [osx] - pytest -v tests/ -k "not ({{ tests_to_skip }})" - name: gymnasium-atari From 4f7c97a767532b52c101368c2133747eb8375816 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 14:46:00 +0200 Subject: [PATCH 15/36] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 43936f8..d88ec5b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -119,7 +119,7 @@ outputs: - export MUJOCO_GL="osmesa" # [linux] # Ensure that pygame tests pass on osx, # see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124699477 - - export SDL_VIDEODRIVER="dummy" # [osx] + - export SDL_VIDEODRIVER="dummy" # [osx] - pytest -v tests/ -k "not ({{ tests_to_skip }})" - name: gymnasium-atari From 897d31aa05d7a92e3dd2bf26c3b5d9b5835ac1b6 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 15:22:56 +0200 Subject: [PATCH 16/36] Update meta.yaml --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d88ec5b..d5491bf 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -75,8 +75,8 @@ outputs: - pytest - scipy - dill - - jax >=0.4 # [osx or linux64] - - flax # [osx or linux64] + - jax >=0.4 # [unix and not ppc64le] + - flax # [unix and not ppc64le] - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] commands: From 74e52fd99e205fe6ba30f573a1cf02b57818b9e0 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 19:03:23 +0200 Subject: [PATCH 17/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d5491bf..3d27efc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -115,6 +115,8 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute" %} # [osx] # See https://github.com/conda-forge/gymnasium-feedstock/pull/32#issuecomment-2031810613 {% set tests_to_skip = tests_to_skip + " or test_render_modes" %} # [aarch64] + # https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124810832 + {% set tests_to_skip = tests_to_skip + " or test_model_object_count[v5]" %} # [py == 38] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo - export MUJOCO_GL="osmesa" # [linux] # Ensure that pygame tests pass on osx, From ad7e21ba81e9d3d7c68c8dee5ea920adf465342f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 May 2024 19:07:33 +0200 Subject: [PATCH 18/36] Update meta.yaml --- recipe/meta.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3d27efc..c2c7f4a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -111,12 +111,15 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_play_relevant_keys" %} # [osx] {% set tests_to_skip = tests_to_skip + " or test_pygame_quit_event" %} # [osx] {% set tests_to_skip = tests_to_skip + " or test_video_size_no_zoom" %} # [osx] - {% set tests_to_skip = tests_to_skip + " or test_offscreen_viewer_custom_dimensions" %} # [osx] - {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute" %} # [osx] + {% set tests_to_skip = tests_to_skip + " or test_offscreen_viewer_custom_dimensions" %} # [osx or win] + {% set tests_to_skip = tests_to_skip + " or test_max_geom_attribute" %} # [osx or win] # See https://github.com/conda-forge/gymnasium-feedstock/pull/32#issuecomment-2031810613 {% set tests_to_skip = tests_to_skip + " or test_render_modes" %} # [aarch64] # https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124810832 {% set tests_to_skip = tests_to_skip + " or test_model_object_count[v5]" %} # [py == 38] + # This test use fork, that is not available on Windows + {% set tests_to_skip = tests_to_skip + " or test_async_with_dynamically_registered_env[fork" %} # [win] + {% set tests_to_skip = tests_to_skip + " or test_shared_memory_create_read_write[fork" %} # [win] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo - export MUJOCO_GL="osmesa" # [linux] # Ensure that pygame tests pass on osx, From b46e50f98c634570435a791f9fec7e1cfed9a93d Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 12:06:01 +0200 Subject: [PATCH 19/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c2c7f4a..ed00e0e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -80,6 +80,8 @@ outputs: - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] commands: + # Debug aarch64 problem, remove at some point + - python -c "import jax" # [unix and not ppc64le] # On Python 3.8 do not do pip check, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124179635 - pip check # [py != 38] {% set tests_to_skip = "_not_a_real_test" %} From 71c8a6c3a3dbe6fd82e55861eaaa56a427343696 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 16:40:52 +0200 Subject: [PATCH 20/36] Create 1065.patch --- recipe/patches/1065.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 recipe/patches/1065.patch diff --git a/recipe/patches/1065.patch b/recipe/patches/1065.patch new file mode 100644 index 0000000..539f614 --- /dev/null +++ b/recipe/patches/1065.patch @@ -0,0 +1,30 @@ +From 36e67165ba693cfe80bf2c6b02e5278fe435f9c8 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Fri, 24 May 2024 16:24:09 +0200 +Subject: [PATCH] Fix RescaleObservation on Windows + +--- + gymnasium/wrappers/transform_observation.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/gymnasium/wrappers/transform_observation.py b/gymnasium/wrappers/transform_observation.py +index b288c426c..a95daf6ce 100644 +--- a/gymnasium/wrappers/transform_observation.py ++++ b/gymnasium/wrappers/transform_observation.py +@@ -517,9 +517,14 @@ def __init__( + self.max_obs = max_obs + + # Imagine the x-axis between the old Box and the y-axis being the new Box ++ # float128 is not available everywhere ++ try: ++ high_low_diff_dtype = np.float128 ++ except AttributeError: ++ high_low_diff_dtype = np.float64 + high_low_diff = np.array( +- env.observation_space.high, dtype=np.float128 +- ) - np.array(env.observation_space.low, dtype=np.float128) ++ env.observation_space.high, dtype=high_low_diff_dtype ++ ) - np.array(env.observation_space.low, dtype=high_low_diff_dtype) + gradient = np.array( + (max_obs - min_obs) / high_low_diff, dtype=env.observation_space.dtype + ) From 671c171d060563aa5cc7d18625866bf23742ed4a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 16:41:20 +0200 Subject: [PATCH 21/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ed00e0e..991f0fe 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,6 +9,8 @@ source: sha256: 8e05eb7b41aaa2c7cd2fca7fc8f380ca38a814a5fdc67d9ce8614e5014c90683 patches: - 1060.patch + # https://github.com/Farama-Foundation/Gymnasium/pull/1065 + - 1065.patch build: number: 0 From bc3f555567fd1f55ac362a5d19f48a816f9e5d63 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 16:41:37 +0200 Subject: [PATCH 22/36] Update meta.yaml --- recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 991f0fe..d935604 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,9 +8,10 @@ source: url: https://github.com/Farama-Foundation/Gymnasium/archive/refs/tags/v{{ version }}a2.tar.gz sha256: 8e05eb7b41aaa2c7cd2fca7fc8f380ca38a814a5fdc67d9ce8614e5014c90683 patches: + # https://github.com/Farama-Foundation/Gymnasium/pull/1060 - 1060.patch # https://github.com/Farama-Foundation/Gymnasium/pull/1065 - - 1065.patch + - patches/1065.patch build: number: 0 From 4b5c7989fbdc4e84af267d9dd3247d8551a300e0 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 18:10:19 +0200 Subject: [PATCH 23/36] Update meta.yaml --- recipe/meta.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d935604..db3641e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -82,9 +82,8 @@ outputs: - flax # [unix and not ppc64le] - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] + - mujoco-python >=3.1.5 commands: - # Debug aarch64 problem, remove at some point - - python -c "import jax" # [unix and not ppc64le] # On Python 3.8 do not do pip check, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124179635 - pip check # [py != 38] {% set tests_to_skip = "_not_a_real_test" %} From d2f4cfc4b06a9921989afc5e5c27acd8dc6cafc7 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 18:11:25 +0200 Subject: [PATCH 24/36] Create 1066.patch --- recipe/patches/1066.patch | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 recipe/patches/1066.patch diff --git a/recipe/patches/1066.patch b/recipe/patches/1066.patch new file mode 100644 index 0000000..7da52e7 --- /dev/null +++ b/recipe/patches/1066.patch @@ -0,0 +1,77 @@ +From 13d3653c7a40e2b97bc694f3602a715b2ae6a85f Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Fri, 24 May 2024 17:56:31 +0200 +Subject: [PATCH] Fix test_dict_info_to_list test on Windows + +--- + .../wrappers/vector/test_dict_info_to_list.py | 23 ++++++++++++------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/tests/wrappers/vector/test_dict_info_to_list.py b/tests/wrappers/vector/test_dict_info_to_list.py +index 9e61f29b9..f07c97005 100644 +--- a/tests/wrappers/vector/test_dict_info_to_list.py ++++ b/tests/wrappers/vector/test_dict_info_to_list.py +@@ -60,9 +60,13 @@ def test_update_info(): + "_e": np.array([True]), + } + _, list_info = env.reset(options=vector_infos) ++ ++ # The return dtype of np.array([0]) is platform dependent ++ np_array_int_default_dtype = np.array([0]).dtype.type ++ + expected_list_info = [ + { +- "a": np.int64(0), ++ "a": np_array_int_default_dtype(0), + "b": np.float64(0.0), + "c": None, + "d": np.zeros((2,)), +@@ -90,21 +94,21 @@ def test_update_info(): + _, list_info = env.reset(options=vector_infos) + expected_list_info = [ + { +- "a": np.int64(0), ++ "a": np_array_int_default_dtype(0), + "b": np.float64(0.0), + "c": None, + "d": np.zeros((2,)), + "e": Discrete(1), + }, + { +- "a": np.int64(1), ++ "a": np_array_int_default_dtype(1), + "b": np.float64(1.0), + "c": None, + "d": np.zeros((2,)), + "e": Discrete(2), + }, + { +- "a": np.int64(2), ++ "a": np_array_int_default_dtype(2), + "b": np.float64(2.0), + "c": None, + "d": np.zeros((2,)), +@@ -134,7 +138,7 @@ def test_update_info(): + } + _, list_info = env.reset(options=vector_infos) + expected_list_info = [ +- {"a": np.int64(1), "b": np.float64(1.0)}, ++ {"a": np_array_int_default_dtype(1), "b": np.float64(1.0)}, + {"c": None, "d": np.zeros((2,))}, + {"e": Discrete(3)}, + ] +@@ -156,8 +160,11 @@ def test_update_info(): + } + _, list_info = env.reset(options=vector_infos) + expected_list_info = [ +- {"episode": {"a": np.int64(1), "b": np.float64(1.0)}}, +- {"episode": {"a": np.int64(2), "b": np.float64(2.0)}, "a": np.int64(1)}, +- {"a": np.int64(2)}, ++ {"episode": {"a": np_array_int_default_dtype(1), "b": np.float64(1.0)}}, ++ { ++ "episode": {"a": np_array_int_default_dtype(2), "b": np.float64(2.0)}, ++ "a": np_array_int_default_dtype(1), ++ }, ++ {"a": np_array_int_default_dtype(2)}, + ] + assert data_equivalence(list_info, expected_list_info) From 593c7f8e640d143a872dd1ea7defca10a4b3f122 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 18:11:36 +0200 Subject: [PATCH 25/36] Delete recipe/patches/932.patch --- recipe/patches/932.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 recipe/patches/932.patch diff --git a/recipe/patches/932.patch b/recipe/patches/932.patch deleted file mode 100644 index 3ae1448..0000000 --- a/recipe/patches/932.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/gymnasium/spaces/multi_discrete.py b/gymnasium/spaces/multi_discrete.py -index 09f930ff8..caf488764 100644 ---- a/gymnasium/spaces/multi_discrete.py -+++ b/gymnasium/spaces/multi_discrete.py -@@ -172,7 +172,7 @@ def from_jsonable( - self, sample_n: list[Sequence[int]] - ) -> list[NDArray[np.integer[Any]]]: - """Convert a JSONable data type to a batch of samples from this space.""" -- return [np.array(sample) for sample in sample_n] -+ return [np.array(sample, dtype=np.int64) for sample in sample_n] - - def __repr__(self): - """Gives a string representation of this space.""" From 955d9b70df3d2464c3612844affb41ce626080e1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 24 May 2024 18:11:57 +0200 Subject: [PATCH 26/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index db3641e..d0c09ca 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,6 +12,8 @@ source: - 1060.patch # https://github.com/Farama-Foundation/Gymnasium/pull/1065 - patches/1065.patch + # https://github.com/Farama-Foundation/Gymnasium/pull/1066 + - patches/1066.patch build: number: 0 From 4ac209432c118048d157bdbbbb69123c81cda780 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sun, 26 May 2024 20:59:54 +0200 Subject: [PATCH 27/36] Update meta.yaml --- recipe/meta.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d0c09ca..425582e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -80,8 +80,12 @@ outputs: - pytest - scipy - dill - - jax >=0.4 # [unix and not ppc64le] - - flax # [unix and not ppc64le] + # Recent versions of jax are not available on Python 3.8 + # https://github.com/conda-forge/jax-feedstock/pull/123 + # jax is not properly working in linux-aarch64 + # https://github.com/conda-forge/jax-feedstock/issues/144 + - jax >=0.4 # [unix and not ppc64le and not aarch64 and py != 38] + - flax # [unix and not ppc64le and not aarch64 and py != 38] - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] - mujoco-python >=3.1.5 From 9f44e5ba1d746cc33ba97584bab57b63a0b6259e Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sun, 26 May 2024 22:56:37 +0200 Subject: [PATCH 28/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 425582e..e9a8032 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -127,6 +127,8 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_render_modes" %} # [aarch64] # https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124810832 {% set tests_to_skip = tests_to_skip + " or test_model_object_count[v5]" %} # [py == 38] + # https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2132386189 + {% set tests_to_skip = tests_to_skip + " or test_cartpole_vector_equiv" %} # [py == 38] # This test use fork, that is not available on Windows {% set tests_to_skip = tests_to_skip + " or test_async_with_dynamically_registered_env[fork" %} # [win] {% set tests_to_skip = tests_to_skip + " or test_shared_memory_create_read_write[fork" %} # [win] From 24e9d79af1832a6881fb9bd1b7da574478a30c5c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sun, 26 May 2024 22:57:17 +0200 Subject: [PATCH 29/36] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e9a8032..800a75c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -88,7 +88,7 @@ outputs: - flax # [unix and not ppc64le and not aarch64 and py != 38] - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] - - mujoco-python >=3.1.5 + - mujoco-python commands: # On Python 3.8 do not do pip check, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124179635 - pip check # [py != 38] From a1b70571f153e3853c25b4c085182600994c68a5 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 27 May 2024 23:53:53 +0200 Subject: [PATCH 30/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 800a75c..ab90e7f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -137,6 +137,8 @@ outputs: # Ensure that pygame tests pass on osx, # see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124699477 - export SDL_VIDEODRIVER="dummy" # [osx] + - rm tests/envs/mujoco/test_mujoco_v5.py # [aarch64] + - rm tests/wrappers/test_atari_preprocessing.py # [aarch64] - pytest -v tests/ -k "not ({{ tests_to_skip }})" - name: gymnasium-atari From bb08af25d3315b4a1e09df35590731c1ebc0e315 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 28 May 2024 00:13:03 +0200 Subject: [PATCH 31/36] Update meta.yaml --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ab90e7f..2dcc21a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -132,6 +132,8 @@ outputs: # This test use fork, that is not available on Windows {% set tests_to_skip = tests_to_skip + " or test_async_with_dynamically_registered_env[fork" %} # [win] {% set tests_to_skip = tests_to_skip + " or test_shared_memory_create_read_write[fork" %} # [win] + # test_offscreen_viewer_custom_dimensions + {% set tests_to_skip = tests_to_skip + " or test_offscreen_viewer_custom_dimensions" %} # [aarch64] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo - export MUJOCO_GL="osmesa" # [linux] # Ensure that pygame tests pass on osx, From 36c0cc862a4f5c86d6be1b28bcb51c705c96cacc Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 28 May 2024 08:55:56 +0200 Subject: [PATCH 32/36] Update meta.yaml --- recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2dcc21a..1a35696 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -89,6 +89,9 @@ outputs: - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] - mujoco-python + # Use headless opencv for tests (see https://github.com/conda-forge/opencv-feedstock/issues/401) + # This is especially useful when cross-compiling as tests are emulated but CDT may not be available + - libopencv *=headless* commands: # On Python 3.8 do not do pip check, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124179635 - pip check # [py != 38] From 453fe7e46bafec378d162e13c014bbac49ba10e3 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 28 May 2024 09:11:59 +0200 Subject: [PATCH 33/36] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1a35696..bb23bae 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -91,7 +91,7 @@ outputs: - mujoco-python # Use headless opencv for tests (see https://github.com/conda-forge/opencv-feedstock/issues/401) # This is especially useful when cross-compiling as tests are emulated but CDT may not be available - - libopencv *=headless* + - libopencv *=headless* # [aarch64] commands: # On Python 3.8 do not do pip check, see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124179635 - pip check # [py != 38] From 8076119f9dca98793fbfac63cf9117e3c7f7ac59 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 28 May 2024 10:18:55 +0200 Subject: [PATCH 34/36] Update meta.yaml --- recipe/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bb23bae..bc304da 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -135,13 +135,15 @@ outputs: # This test use fork, that is not available on Windows {% set tests_to_skip = tests_to_skip + " or test_async_with_dynamically_registered_env[fork" %} # [win] {% set tests_to_skip = tests_to_skip + " or test_shared_memory_create_read_write[fork" %} # [win] - # test_offscreen_viewer_custom_dimensions + # Test that fail on aarch64 {% set tests_to_skip = tests_to_skip + " or test_offscreen_viewer_custom_dimensions" %} # [aarch64] + {% set tests_to_skip = tests_to_skip + " or test_resize_observation_wrapper" %} # [aarch64] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo - export MUJOCO_GL="osmesa" # [linux] # Ensure that pygame tests pass on osx, # see https://github.com/conda-forge/gymnasium-feedstock/pull/36#issuecomment-2124699477 - export SDL_VIDEODRIVER="dummy" # [osx] + # Test that results in crashes on aarch64 during collection - rm tests/envs/mujoco/test_mujoco_v5.py # [aarch64] - rm tests/wrappers/test_atari_preprocessing.py # [aarch64] - pytest -v tests/ -k "not ({{ tests_to_skip }})" From cbd34d7544b29d7710ce4f14ce35fda7f57b2280 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 28 May 2024 14:47:39 +0200 Subject: [PATCH 35/36] Skip more tests on aarch64 --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bc304da..5896aa8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -137,7 +137,7 @@ outputs: {% set tests_to_skip = tests_to_skip + " or test_shared_memory_create_read_write[fork" %} # [win] # Test that fail on aarch64 {% set tests_to_skip = tests_to_skip + " or test_offscreen_viewer_custom_dimensions" %} # [aarch64] - {% set tests_to_skip = tests_to_skip + " or test_resize_observation_wrapper" %} # [aarch64] + {% set tests_to_skip = tests_to_skip + " or test_resize" %} # [aarch64] # need to specify opengl driver on linux to enable offscreen rendering in MuJoCo - export MUJOCO_GL="osmesa" # [linux] # Ensure that pygame tests pass on osx, From 497ee34f660dd4969bbec5195aa672a3c0c6770e Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 12 Jun 2024 19:32:53 +0200 Subject: [PATCH 36/36] Update recipe/meta.yaml Co-authored-by: h-vetinari --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5896aa8..30ba358 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -84,8 +84,8 @@ outputs: # https://github.com/conda-forge/jax-feedstock/pull/123 # jax is not properly working in linux-aarch64 # https://github.com/conda-forge/jax-feedstock/issues/144 - - jax >=0.4 # [unix and not ppc64le and not aarch64 and py != 38] - - flax # [unix and not ppc64le and not aarch64 and py != 38] + - jax >=0.4 # [unix and not (aarch64 or ppc64le or py==38)] + - flax # [unix and not (aarch64 or ppc64le or py==38)] - pytorch >=1.0 # [unix and not ppc64le] - mesalib # [linux] - mujoco-python