Skip to content

Commit

Permalink
conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
levongh committed May 10, 2023
1 parent 6bd93f3 commit 7e02e05
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions deeplake/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ def __exit__(self, *args, **kwargs):


def convert_data_according_to_torch_version(batch):
import torch

if torch.__version__ < "2.0.0":
if isinstance(batch, List):
return batch[0]
else:
return batch

0 comments on commit 7e02e05

Please sign in to comment.