Skip to content

Commit

Permalink
[-] Remove deprecated torch._six
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Oct 11, 2023
1 parent 83a3440 commit 5839288
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/CLAPWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
warnings.filterwarnings("ignore")
import random
import torchaudio
from torch._six import string_classes
import collections
import re
import numpy as np
Expand Down Expand Up @@ -184,7 +183,7 @@ def default_collate(self, batch):
return torch.tensor(batch, dtype=torch.float64)
elif isinstance(elem, int):
return torch.tensor(batch)
elif isinstance(elem, string_classes):
elif isinstance(elem, str):
return batch
elif isinstance(elem, collections.abc.Mapping):
return {key: self.default_collate([d[key] for d in batch]) for key in elem}
Expand Down

0 comments on commit 5839288

Please sign in to comment.