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 25, 2024
1 parent dd5eb67 commit eb4d92a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tensordict/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,12 +1511,8 @@ def assert_close(
return True

try:
set1 = set(
actual.keys(is_leaf=lambda x: not is_non_tensor(x), leaves_only=True)
)
set2 = set(
expected.keys(is_leaf=lambda x: not is_non_tensor(x), leaves_only=True)
)
set1 = set(actual.keys())
set2 = set(expected.keys())
except ValueError:
# Persistent tensordicts do not work with is_leaf
set1 = set(actual.keys(is_leaf=lambda cls: issubclass(cls, torch.Tensor)))
Expand Down

0 comments on commit eb4d92a

Please sign in to comment.