Skip to content

Commit f016fa0

Browse files
author
Vincent Moens
authored
[CI] Fix jumanji (#1566)
1 parent b8e0fb5 commit f016fa0

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

.github/unittest/linux_libs/scripts_jumanji/environment.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@ dependencies:
1818
- scipy
1919
- hydra-core
2020
- jumanji
21-
- jax<=0.4.10
22-
- jaxlib<=0.4.10

test/test_libs.py

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,28 +1986,37 @@ class TestRoboHive:
19861986
# In the CI, robohive should not coexist with other libs so that's fine.
19871987
# Locally these imports can be annoying, especially given the amount of
19881988
# stuff printed by robohive.
1989-
@pytest.mark.parametrize("envname", RoboHiveEnv.available_envs)
19901989
@pytest.mark.parametrize("from_pixels", [True, False])
19911990
@set_gym_backend("gym")
1992-
def test_robohive(self, envname, from_pixels):
1993-
if any(substr in envname for substr in ("_vr3m", "_vrrl", "_vflat", "_vvc1s")):
1994-
print("not testing envs with prebuilt rendering")
1995-
return
1996-
if "Adroit" in envname:
1997-
print("tcdm are broken")
1998-
return
1999-
try:
2000-
env = RoboHiveEnv(envname)
2001-
except AttributeError as err:
2002-
if "'MjData' object has no attribute 'get_body_xipos'" in str(err):
2003-
print("tcdm are broken")
2004-
return
2005-
else:
2006-
raise err
2007-
if from_pixels and len(RoboHiveEnv.get_available_cams(env_name=envname)) == 0:
2008-
print("no camera")
2009-
return
2010-
check_env_specs(env)
1991+
def test_robohive(self, from_pixels):
1992+
for envname in RoboHiveEnv.available_envs:
1993+
try:
1994+
if any(
1995+
substr in envname
1996+
for substr in ("_vr3m", "_vrrl", "_vflat", "_vvc1s")
1997+
):
1998+
print("not testing envs with prebuilt rendering")
1999+
return
2000+
if "Adroit" in envname:
2001+
print("tcdm are broken")
2002+
return
2003+
try:
2004+
env = RoboHiveEnv(envname)
2005+
except AttributeError as err:
2006+
if "'MjData' object has no attribute 'get_body_xipos'" in str(err):
2007+
print("tcdm are broken")
2008+
return
2009+
else:
2010+
raise err
2011+
if (
2012+
from_pixels
2013+
and len(RoboHiveEnv.get_available_cams(env_name=envname)) == 0
2014+
):
2015+
print("no camera")
2016+
return
2017+
check_env_specs(env)
2018+
except Exception as err:
2019+
raise RuntimeError(f"Test with robohive end {envname} failed.") from err
20112020

20122021

20132022
@pytest.mark.skipif(not _has_smacv2, reason="SMACv2 not found")

0 commit comments

Comments
 (0)