Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Oct 16, 2024
1 parent 3bceec5 commit 628fbf8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/test_tensordict.py
Original file line number Diff line number Diff line change
Expand Up @@ -7948,13 +7948,8 @@ def test_consolidate_njt(self, device, use_file, tmpdir, num_threads):
assert hasattr(td_c, "_consolidated")
assert type(td_c) == type(td) # noqa
assert td_c["d"] == "a string!"
with (
pytest.raises(KeyError)
if td.device != td_c.device and device is not None
else contextlib.nullcontext()
):
# njt.to(device) is currently broken when it has lengths
assert_allclose_td(td.to(td_c.device), td_c)

assert_allclose_td(td.to(td_c.device), td_c)

tdload_make, tdload_data = _reduce_td(td)
tdload = tdload_make(*tdload_data)
Expand Down

0 comments on commit 628fbf8

Please sign in to comment.