Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Nov 24, 2024
1 parent bb28b13 commit f474797
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tensordict/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9887,7 +9887,9 @@ def from_any(cls, obj, *, auto_batch_size: bool = False):
if _is_list_tensor_compatible(obj)[0]:
return torch.tensor(obj)
else:
return cls.from_tuple(tuple(obj), auto_batch_size=auto_batch_size)
from tensordict.tensorclass import NonTensorStack

return NonTensorStack.from_list(obj)
if is_dataclass(obj):
return cls.from_dataclass(obj, auto_batch_size=auto_batch_size)
if _has_h5:
Expand Down

0 comments on commit f474797

Please sign in to comment.