MCPcopy
hub / github.com/DLR-RM/stable-baselines3 / test_auto_wrap

Function test_auto_wrap

tests/test_predict.py:47–56  ·  view source on GitHub ↗

Test auto wrapping of env into a VecEnv.

(model_class)

Source from the content-addressed store, hash-verified

45
46@pytest.mark.parametrize("model_class", MODEL_LIST)
47def test_auto_wrap(model_class):
48 """Test auto wrapping of env into a VecEnv."""
49 # Use different environment for DQN
50 if model_class is DQN:
51 env_id = "CartPole-v1"
52 else:
53 env_id = "Pendulum-v1"
54 env = gym.make(env_id)
55 model = model_class("MlpPolicy", env)
56 model.learn(100)
57
58
59@pytest.mark.parametrize("model_class", MODEL_LIST)

Callers

nothing calls this directly

Calls 1

learnMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…