Skip to content

Commit ada0fcd

Browse files
sosmondvmoens
authored andcommitted
[BugFix] replace assert_allclose with assert_close (#644)
1 parent b4b27fe commit ada0fcd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/test_rb.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,12 @@ def test_prototype_prb(priority_key, contiguous, device):
247247
rb.update_tensordict_priority(s)
248248
s, _ = rb.sample(5)
249249
assert (val == s.get("a")).sum() >= 1
250-
torch.testing.assert_allclose(
251-
td2[idx0].get("a").view(1), s.get("a").unique().view(1)
252-
)
250+
torch.testing.assert_close(td2[idx0].get("a").view(1), s.get("a").unique().view(1))
253251

254252
# test updating values of original td
255253
td2.set_("a", torch.ones_like(td2.get("a")))
256254
s, _ = rb.sample(5)
257-
torch.testing.assert_allclose(
258-
td2[idx0].get("a").view(1), s.get("a").unique().view(1)
259-
)
255+
torch.testing.assert_close(td2[idx0].get("a").view(1), s.get("a").unique().view(1))
260256

261257

262258
@pytest.mark.parametrize("stack", [False, True])

0 commit comments

Comments
 (0)