spec_list.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:gym 作者: openai 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号