def load_pip_requirements(self, files_map=None, freeze=True):
        if files_map is None:
            files_map = self.default_pip_files
        for group, requirements_txt in files_map.items():
            path = Path(requirements_txt)
            if not path.exists() and group.lower() == "all" and freeze:
                cmd = envoy.run("pip freeze")
                self[group].loads(cmd.std_out)
            elif path.exists():
                self[group].load(path)
def test_make_gym_stack(name, num_envs, state_shape, reward_scale):
    seed = 0
    frame_op = 'stack'  # used for rnn
    frame_op_len = 4
    venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale)
    venv.reset()
    for i in range(5):
        state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs)

    assert isinstance(state, np.ndarray)
    stack_shape = (num_envs, frame_op_len,) + state_shape
    assert state.shape == stack_shape
    assert isinstance(reward, np.ndarray)
    assert reward.shape == (num_envs,)
    assert isinstance(done, np.ndarray)
    assert done.shape == (num_envs,)
    assert len(info) == num_envs
    venv.close()