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

[BugFix] Make _reset follow done shape #2189

Merged
merged 5 commits into from
May 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
vmoens committed May 31, 2024
commit 1075dd571621f44a3a0505fca9452b41f26683da
6 changes: 3 additions & 3 deletions test/mocking_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,9 +1751,9 @@ def _reset(
if tensordict is not None:
_reset = tensordict.get("_reset", None)
if _reset is not None:
self.count[_reset] = self.start_val
self.count_nested_1[_reset] = self.start_val
self.count_nested_2[_reset] = self.start_val
self.count[_reset.squeeze(-1)] = self.start_val
self.count_nested_1[_reset.squeeze(-1)] = self.start_val
self.count_nested_2[_reset.squeeze(-1)] = self.start_val
else:
reset_all = True

Expand Down
Loading