Skip to content

Commit

Permalink
fix torch dependency for jax and tensor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ylacombe committed Sep 29, 2023
1 parent b16b5a9 commit 8af2313
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@
from typing import List, Optional, Union

import numpy as np
import torch

from ...audio_utils import mel_filter_bank, spectrogram, window_function
from ...feature_extraction_sequence_utils import SequenceFeatureExtractor
from ...feature_extraction_utils import BatchFeature
from ...utils import TensorType, is_speech_available, logging
from ...utils import TensorType, is_speech_available, is_torch_available, logging


if is_speech_available():
import torchaudio.compliance.kaldi as ta_kaldi

if is_torch_available:
import torch


logger = logging.get_logger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from typing import List, Optional, Union

import numpy as np
import torch

from ...audio_utils import mel_filter_bank, spectrogram, window_function
from ...feature_extraction_sequence_utils import SequenceFeatureExtractor
Expand All @@ -28,6 +27,7 @@


if is_speech_available():
import torch
import torchaudio.compliance.kaldi as ta_kaldi

logger = logging.get_logger(__name__)
Expand Down

0 comments on commit 8af2313

Please sign in to comment.