fix Environment missing abstract methods implement

This commit is contained in:
better629 2024-03-26 20:59:29 +08:00
parent 5b7419071e
commit bf75e32f1e

View file

@ -134,6 +134,20 @@ class Environment(ExtEnv):
history: str = "" # For debug
context: Context = Field(default_factory=Context, exclude=True)
def reset(
self,
*,
seed: Optional[int] = None,
options: Optional[dict[str, Any]] = None,
) -> tuple[dict[str, Any], dict[str, Any]]:
pass
def observe(self, obs_params: Optional[BaseEnvObsParams] = None) -> Any:
pass
def step(self, action: BaseEnvAction) -> tuple[dict[str, Any], float, bool, bool, dict[str, Any]]:
pass
@model_validator(mode="after")
def init_roles(self):
self.add_roles(self.roles.values())