Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jul 29, 2024
1 parent d13e97e commit 57e4051
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchrl/collectors/collectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,9 @@ def _maybe_set_truncated(self, final_rollout):
truncated[last_step] = True
final_rollout["next", truncated_key] = truncated
done = final_rollout["next", _replace_last(truncated_key, "done")]
final_rollout["next", _replace_last(truncated_key, "done")] = done | truncated
final_rollout["next", _replace_last(truncated_key, "done")] = (
done | truncated
)
return final_rollout

@torch.no_grad()
Expand Down

0 comments on commit 57e4051

Please sign in to comment.