Skip to content

Commit

Permalink
Change dtype for seq_lens to int32
Browse files Browse the repository at this point in the history
Signed-off-by: Xuehai Pan <[email protected]>
  • Loading branch information
XuehaiPan committed Apr 27, 2022
1 parent 8b6738e commit 426ff69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rllib/policy/tests/test_rnn_sequencing.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ def test_pad_batch_fixed_max(self):
def test_add_time_dimension(self):
"""Test add_time_dimension gives sequential data along the time dimension"""

B, T, F = np.random.choice(list(range(8, 32)), size=3, replace=False)
B, T, F = np.random.choice(
np.asarray(list(range(8, 32)), dtype=np.int32), # use int32 for seq_lens
size=3,
replace=False,
)

inputs_numpy = np.repeat(
np.arange(B * T)[:, np.newaxis], repeats=F, axis=-1
Expand Down

0 comments on commit 426ff69

Please sign in to comment.