def should_skip_env_spec_for_tests(spec):
# We skip tests for envs that require dependencies or are otherwise
# troublesome to run frequently
ep = spec._entry_point
# Skip mujoco tests for pull request CI
skip_mujoco = not (os.environ.get('MUJOCO_KEY_BUNDLE') or os.path.exists(os.path.expanduser('~/.mujoco')))
if skip_mujoco and ep.startswith('gym.envs.mujoco:'):
return True
if ( 'GoEnv' in ep or
'HexEnv' in ep or
ep.startswith('gym.envs.box2d:') or
ep.startswith('gym.envs.box2d:') or
ep.startswith('gym.envs.parameter_tuning:') or
ep.startswith('gym.envs.safety:Semisuper') or
(ep.startswith("gym.envs.atari") and not spec.id.startswith("Pong") and not spec.id.startswith("Seaquest"))
):
logger.warning("Skipping tests for env {}".format(ep))
return True
return False
评论列表
文章目录