Skip to content

Commit

Permalink
address #226
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Aug 31, 2023
1 parent 44ae4de commit 5e0261b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions audiolm_pytorch/hubert_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@

import torch
from torch import nn, einsum
from einops import rearrange, repeat, pack, unpack

import joblib

import fairseq

from torchaudio.functional import resample

from einops import rearrange, repeat, pack, unpack

from audiolm_pytorch.utils import curtail_to_multiple

# suppress a few warnings

def noop(*args, **kwargs):
pass

import warnings
import logging

logging.root.setLevel(logging.ERROR)

warnings.warn = noop

# import fairseq and joblib for hubert

import joblib
import fairseq

# helper functions

def exists(val):
return val is not None

Expand All @@ -37,9 +50,6 @@ def __init__(
):
super().__init__()

import sklearn
assert sklearn.__version__ == '0.24.0', 'scikit-learn needs to be exactly 0.24.0 - please install the correct version by running `pip install scikit-learn==0.24.0`'

self.target_sample_hz = target_sample_hz
self.seq_len_multiple_of = seq_len_multiple_of
self.output_layer = output_layer
Expand Down
2 changes: 1 addition & 1 deletion audiolm_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.4.0'
__version__ = '1.4.1'

0 comments on commit 5e0261b

Please sign in to comment.