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

Changing step to return truncate=True #445

Conversation

reginald-mclean
Copy link
Collaborator

in the previous version of Meta-World, there was a check to see if the current trajectory has equalled the maximum trajectory length. Now with environments returning termination and truncation signals, we can add a check to see if truncate should be sent by comparing the current trajectory length to the maximum trajectory length. To ensure that the environment does get reset, the ValueError that was normally raised hasn't been changed.

@@ -458,11 +458,9 @@ def sawyer_observation_space(self):
def step(self, action):
assert len(action) == 4, f"Actions should be size 4, got {len(action)}"
self.set_xyz_action(action[:3])
if self.curr_path_length == self.max_path_length:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be greater than or equal?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pseudo-rnd-thoughts yeah that's fair. My thinking was that it should be impossible to ever get past the max path length but I can make that change

Copy link
Member

@pseudo-rnd-thoughts pseudo-rnd-thoughts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for being slow to approve, LGTM

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 185775b into Farama-Foundation:master Oct 11, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants