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

Fixed edge case handling in RecordEpisode wrapper #31

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

xiqiangliu
Copy link
Contributor

@xiqiangliu xiqiangliu commented Oct 5, 2022

Due to empty action history, the current RecordEpisode wrapper will throw out an error when a user resets twice under the default setting, as _episode_data is not empty. The same would also happen if flush_trajectory() is manually called right after the reset when save_on_reset is turned off.

@xiqiangliu xiqiangliu requested a review from Jiayuan-Gu October 5, 2022 04:16
@Jiayuan-Gu
Copy link
Contributor

It seems to be an expected behavior, since the observation after resetting the environment is a part of the trajectory. Can you elaborate on the cases that cause inconvenience when you want to ignore observations after reset?

xiqiangliu and others added 2 commits October 10, 2022 15:02
* rename `reorder_trajectories` to `clean_on_close`
* `clean_on_close` is set to True by default
* handle empty action and done
@Jiayuan-Gu Jiayuan-Gu merged commit 2054744 into main Oct 10, 2022
@Jiayuan-Gu Jiayuan-Gu deleted the fix-record-wrapper branch October 10, 2022 23:30
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