Improves typing in examples and tests, towards mypy passing there. Introduces the SpaceInfo utility
15 lines
428 B
Python
15 lines
428 B
Python
from tianshou.highlevel.env import (
|
|
EnvFactoryRegistered,
|
|
VectorEnvType,
|
|
)
|
|
|
|
|
|
class DiscreteTestEnvFactory(EnvFactoryRegistered):
|
|
def __init__(self) -> None:
|
|
super().__init__(task="CartPole-v0", seed=42, venv_type=VectorEnvType.DUMMY)
|
|
|
|
|
|
class ContinuousTestEnvFactory(EnvFactoryRegistered):
|
|
def __init__(self) -> None:
|
|
super().__init__(task="Pendulum-v1", seed=42, venv_type=VectorEnvType.DUMMY)
|