From 583928827daa8e115b93e926c65c91cc874e91a4 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:26:10 -0400 Subject: [PATCH] [-] Remove deprecated torch._six --- src/CLAPWrapper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CLAPWrapper.py b/src/CLAPWrapper.py index df9c79f..0755bf1 100644 --- a/src/CLAPWrapper.py +++ b/src/CLAPWrapper.py @@ -2,7 +2,6 @@ import warnings warnings.filterwarnings("ignore") import random import torchaudio -from torch._six import string_classes import collections import re import numpy as np @@ -184,7 +183,7 @@ class CLAPWrapper(): 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}