Skip to content

Commit

Permalink
[RLlib] Add correct terminated and truncated batch sizes on zero-leng…
Browse files Browse the repository at this point in the history
…th episodes (#46721)
  • Loading branch information
Mark2000 authored Sep 25, 2024
1 parent a6cf9d7 commit 4a5207d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def __call__(
Columns.TERMINATEDS,
items_to_add=(
[False] * (len(sa_episode) - 1) + [sa_episode.is_terminated]
if len(sa_episode) > 0
else []
),
num_items=len(sa_episode),
single_agent_episode=sa_episode,
Expand All @@ -132,6 +134,8 @@ def __call__(
Columns.TRUNCATEDS,
items_to_add=(
[False] * (len(sa_episode) - 1) + [sa_episode.is_truncated]
if len(sa_episode) > 0
else []
),
num_items=len(sa_episode),
single_agent_episode=sa_episode,
Expand Down

0 comments on commit 4a5207d

Please sign in to comment.