cdhx
Hi, thanks for publishing this code. It is really helpful for me! I have some questions about the code. 1. in https://github.com/ysymyth/ReAct/blob/6bdb3a1fd38b8188fc7ba4102969fe483df8fdc9/wrappers.py#L162 ``` def reset(self, seed=None, return_info=False, options=None, idx=None): self.env.reset(seed=seed, return_info=return_info, options=options) try: self.env.step('') except: pass self.env.reset(seed=seed, return_info=return_info, options=options) self.data_idx = int(np.random.randint(len(self.data))) if idx is None else idx observation = f"Claim: {self.data[self.data_idx][0]}" info = self._get_info() return (observation, info) if return_info else observation ``` I can not figure out why we need this try-except code, it seems this part of the code did nothing. The second `self.env.reset` will reset the env, there is no need for the first reset. 2. Still for the `reset` code, the `return_info` argument seems always been False. I think this argument can be dropped. Besides, the `options` and `seed` arguments have never been used in `WikiEnv.reset`, `FeverWrapper.reset` and `WikiEnv.reset`. ``` def reset(self, seed=None, return_info=False, options=None, idx=None):``` https://github.com/ysymyth/ReAct/blob/6bdb3a1fd38b8188fc7ba4102969fe483df8fdc9/wikienv.py#L44 https://github.com/ysymyth/ReAct/blob/6bdb3a1fd38b8188fc7ba4102969fe483df8fdc9/wrappers.py#L158 https://github.com/ysymyth/ReAct/blob/6bdb3a1fd38b8188fc7ba4102969fe483df8fdc9/wrappers.py#L214 3. in the `WikiEnv.step`, the `reward` has not been changed since it was initialized, and has never been used why do we need this variable? Besides, in the `FeverWrapper.step`, the reward is obtained by `self.get_reward`, not from `WikiEnv.step`. in https://github.com/ysymyth/ReAct/blob/6bdb3a1fd38b8188fc7ba4102969fe483df8fdc9/wrappers.py#L188, you use a `_` to receive the `reward` from `WikiEnv.step`, it also demonstrated the `reward` in `WikiEnv.step` is not useful. Thanks for your patience ~