Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword is_bc_policy #1

Open
zichunxx opened this issue Nov 23, 2023 · 3 comments
Open

Keyword is_bc_policy #1

zichunxx opened this issue Nov 23, 2023 · 3 comments

Comments

@zichunxx
Copy link

Hi!

I was trying to go through the training process with SawyerPushObstacle-v0. I met the keyword error when the following line is executed

obs, reward, done, info = self._env_eval.step(action.detach().cpu().numpy(), is_bc_policy=True)

where the step function in BaseEnv has no is_bc_policy keyword.

def step(self, action, is_planner=False, is_mopa_rl=True):

Or, the _step method should be called here?

def _step(self, action, is_planner=False, is_mopa_rl=True, is_bc_policy=False):

Looking forward to your reply, thanks.

@arthur801031
Copy link
Collaborator

Hello!

I don't remember having to change the step function to _step, but after looking at the code, I think replacing that step function call with _step makes sense. Could you try it and see if everything works as intended?

Thanks!

@zichunxx
Copy link
Author

zichunxx commented Nov 24, 2023

Thanks for your response and the patience to check the code!

I have changed the step function to _step and it works. Because of this keyword, I think _step should be called here.

Besides, it seems that there is no set_seed method in gym 0.15.4. I think it should be changed to the seed method.

self._env_eval.set_seed(eval_seed)

@arthur801031
Copy link
Collaborator

Yes, please change it to the seed function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants