def set_termination_from_config(self, env_name: str, env_config: dict): """Build and set the termination function from environment configurations. Args: env_name: the environment's id env_config: the environment's configuration """ self.termination_fn = get_termination_fn(env_name, env_config)
def env_termination(request, envs, env_config): env_name = request.param if env_name == "IndustrialBenchmark-v0": env_config["max_episode_steps"] = 200 env = envs[env_name](env_config) termination_fn = get_termination_fn(env_name, env_config) return env, termination_fn, env_config.get("time_aware", False)
def env_termination(request, envs, env_config): env_name = request.param env = envs[env_name](env_config) termination_fn = get_termination_fn(env_name, env_config) return env, termination_fn, env_config.get("time_aware", False)
def set_termination_from_config(self): """Build and set a termination function from environment configurations.""" env_id, env_config = self.config["env"], self.config["env_config"] self.termination_fn = envs.get_termination_fn(env_id, env_config) self._set_termination_hook()
def termination_fn(env_name, env_config, size): base = envs.get_termination_fn(env_name, env_config) wrapped = LinearRedundant.wrap_env_function(base, size) return wrapped
def termination_fn(env_name, env_config, size): base = envs.get_termination_fn(env_name, env_config) wrapped = CorrelatedIrrelevant.wrap_env_function(base, size) return wrapped