Skip to content

Some tests are not skipped properly #1589

@yangarbiter

Description

@yangarbiter

🐛 Bug

The bug is discovered in this discussion. These tests (kaldi_io_test.py, backend/soundfile/load_test.py, backend/soundfile/save_test.py) should be skipped if soundfile or kaldi_io are not installed. But instead these tests just Failed.

To Reproduce

Steps to reproduce the behavior:

  1. conda create -n temp -c pytorch-nightly pytorch
  2. conda activate temp
  3. git clone --recursive https://github.com/pytorch/audio
  4. cd audio
  5. git submodule update --init --recursive
  6. pip install typing pytest scipy numpy parameterized pyyaml
  7. NO_CUDA=1 BUILD_SOX=1 MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
  8. cd test/torchaudio_unittest
  9. pytest kaldi_io_test.py
  10. pytest backend/soundfile/load_test.py
  11. pytest backend/soundfile/save_test.py

Expected behavior

The related tests should be skipped if soundfile or kaldi_io are not installed.

Environment

  • What commands did you used to install torchaudio (conda/pip/build from source)?
    Please refer to the section To Reproduce.
  • If you are building from source, which commit is it?
    7deea25
  • What does torchaudio.__version__ print? (If applicable)
    '0.10.0a0+7deea25'
    Collecting environment information...
    PyTorch version: 1.10.0.dev20210618
    Is debug build: False
    CUDA used to build PyTorch: None
    ROCM used to build PyTorch: N/A

OS: macOS 11.4 (x86_64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.9)
CMake version: version 3.20.4
Libc version: N/A

Python version: 3.9 (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.3
[pip3] torch==1.10.0.dev20210618
[pip3] torchaudio==0.10.0a0+7deea25
[conda] blas 1.0 mkl
[conda] mkl 2021.2.0 hecd8cb5_269
[conda] numpy 1.20.3 pypi_0 pypi
[conda] pytorch 1.10.0.dev20210618 py3.9_0 pytorch-nightly
[conda] torchaudio 0.10.0a0+7deea25 pypi_0 pypi

Additional context

CC @mthrok @vincentqb @carolineechen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions