Skip to content

Commit

Permalink
Update dm-control, update dm-control list of tasks and reduce warnings (
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored Feb 16, 2023
1 parent f3021b5 commit 1c2a04e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def get_version():
"gym": ["gym>=0.26"],
"atari": ["ale-py~=0.8.0"],
# "imageio" should be "gymnasium[mujoco]>=0.26" but there are install conflicts
"dm-control": ["dm-control>=1.0.8", "imageio", "h5py>=3.7.0"],
"dm-control-multi-agent": ["dm-control>=1.0.8", "pettingzoo>=1.22"],
"dm-control": ["dm-control>=1.0.10", "imageio", "h5py>=3.7.0"],
"dm-control-multi-agent": ["dm-control>=1.0.10", "pettingzoo>=1.22"],
"openspiel": ["open_spiel>=1.2", "pettingzoo>=1.22"],
}
extras["all"] = list({lib for libs in extras.values() for lib in libs})
Expand Down
1 change: 1 addition & 0 deletions shimmy/utils/envs_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
("humanoid", "run"),
("humanoid", "run_pure_state"),
("humanoid_CMU", "stand"),
("humanoid_CMU", "walk"),
("humanoid_CMU", "run"),
("lqr", "lqr_2_1"),
("lqr", "lqr_6_2"),
Expand Down
9 changes: 5 additions & 4 deletions tests/test_dm_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import numpy as np
import pytest
from dm_control import composer
from dm_control.locomotion.examples.basic_cmu_2019 import cmu_humanoid_run_walls
from dm_control.suite.wrappers import (
action_noise,
action_scale,
Expand Down Expand Up @@ -64,7 +63,7 @@ def test_dm_control_suite_envs():
@pytest.mark.parametrize("env_id", DM_CONTROL_ENV_IDS)
def test_check_env(env_id):
"""Check that environment pass the gymnasium check_env."""
env = gym.make(env_id)
env = gym.make(env_id, disable_env_checker=True)

with warnings.catch_warnings(record=True) as caught_warnings:
check_env(env.unwrapped)
Expand Down Expand Up @@ -169,6 +168,8 @@ def test_dm_control_wrappers(
if warning_message.message.args[0] not in CHECK_ENV_IGNORE_WARNINGS:
raise Error(f"Unexpected warning: {warning_message.message}")

env = gym.make("dm_control/compatibility-env-v0", env=wrapped_env)
check_env(env, skip_render_check=True)
env = gym.make(
"dm_control/compatibility-env-v0", env=wrapped_env, disable_env_checker=True
)
check_env(env.unwrapped, skip_render_check=True)
env.close()

1 comment on commit 1c2a04e

@vercel
Copy link

@vercel vercel bot commented on 1c2a04e Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.