Skip to content

Commit

Permalink
Direct people to CONTRIBUTION.md for installing related package in th…
Browse files Browse the repository at this point in the history
…e unittest README.md
  • Loading branch information
yangarbiter committed Jun 19, 2021
1 parent f15d5a1 commit f754a7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ conda install pytorch -c pytorch-nightly
pip install cmake ninja
```

### Install other requirements

```bash
git clone https://github.com/pytorch/audio.git
cd audio
Expand All @@ -69,7 +67,7 @@ BUILD_SOX=1 python setup.py develop
# DEBUG=1 python setup.py develop
```

If you built sox, set the `PATH` variable so that the tests properly use the newly built `SoX` binary:
If you built sox, set the `PATH` variable so that the tests properly use the newly built `sox` binary:

```bash
export PATH="<path_to_torchaudio>/third_party/install/bin:${PATH}"
Expand All @@ -78,13 +76,13 @@ export PATH="<path_to_torchaudio>/third_party/install/bin:${PATH}"
The following dependencies are also needed for testing:

```bash
pip install typing pytest scipy numpy parameterized pyyaml
pip install typing pytest scipy numpy parameterized
```

Optional packages to install if you want to run related tests:

```bash
pip install librosa requests soundfile kaldi_io transformers fariseq
pip install librosa requests soundfile kaldi_io transformers
```

## Development Process
Expand Down
15 changes: 4 additions & 11 deletions test/torchaudio_unittest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
You can use `pytest` to run `torchaudio`'s test suites. See
https://docs.pytest.org/ for the detail of how to use `pytest` command.

For testing, the following packages are needed:
For testing, please refer to [contributing guide](../../CONTRIBUTING.md) for
installation of the required and optional packages.

```bash
pip install typing pytest scipy numpy parameterized
pip install -r requirements.txt
```

Make sure to follow the installation instruction in the [contributing
guide](../../CONTRIBUTING.md) first. For running `kaldi`-related tests:
For running `kaldi`-related tests:

```bash
export PATH="${PATH}:<path_to_kaldi>/src/featbin/"
Expand Down Expand Up @@ -74,9 +69,7 @@ The following test modules are defined for corresponding `torchaudio` module/fun
- [`torchaudio.compliance.kaldi`](./compliance_kaldi_test.py)
- [`torchaudio.kaldi_io`](./kaldi_io_test.py)
- [`torchaudio.sox_effects`](./sox_effect)
- [`torchaudio.save`, `torchaudio.load`, `torchaudio.info`]
- soundfile backend: [[save](./backend/soundfile/save_test.py), [load](./backend/soundfile/load_test.py), [info](./backend/soundfile/info_test.py)]
- SoX backend: [[save](./backend/sox_io/save_test.py), [load](./backend/sox_io/load_test.py), [info](./backend/sox_io/info_test.py)]
- [`torchaudio.backend`](./backend)

### Test modules that do not fall into the above categories
- [test_dataloader.py](./dataloader_test.py)
Expand Down

0 comments on commit f754a7b

Please sign in to comment.