question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove insignificant test assets

See original GitHub issue

@astaff had introduced guideline for test assets in https://github.com/pytorch/audio/pull/759 and we can get rid of the following existing assets.

  • 100Hz_44100Hz_16bit_05sec.wav sine wave, should be replaced by on-the-fly generation.
  • 440Hz_44100Hz_16bit_05sec.wav sine wave, should be replaced by on-the-fly generation.
  • CommonVoice/cv-corpus-4-2019-12-10/tt/clips/common_voice_tt_00000000.mp3 whitenoise, should be converted to wav so that test does not require mp3 decoder.
  • dtmf_30s_stereo.mp3 not used.
  • genres/noise/noise.0000.wav should be replaced by on-the-fly generation.
  • kaldi_file.wav sine wave only contains 20 samples and I do not think this is appropriate for test.
  • kaldi_file_8000.wav sine wave, should prefer on-the-fly generation.
  • sinewave.wav sine wave, should prefer on-the-fly generation.
  • steam-train-whistle-daniel_simon.mp3 should be replaced by steam-train-whistle-daniel_simon.wav
  • test.wav file generated during test_io.py accidentally checked in
  • waves_yesno/0_1_0_1_0_1_1_0.wav
  • whitenoise_1min.mp3 should be replaced by on-the-fly generation.
  • whitenoise.mp3 should be replaced by on-the-fly generation.
  • whitenoise.wav should be replaced by on-the-fly generation.

General Direction for replacing assets with on-the-fly generation

  1. Create Tensor
common_utils.get_sinusoid
common_utils.get_whitenoise
  1. Get temporary file path
self.get_temp_path('foo.wav')
# suppose this class is composed of `common_utils.TempDirMixin`
  1. Save wav file
common_utils.save_wav(path, data)
  1. Load wav file
common_utils.load_wav(path)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mthrokcommented, Jul 12, 2020

Hi @engineerchuan

I am sorry I replied you in very rushed manner and I gave you a wrong description which ended up confusing you.

I found the mp3 file in 4 places, but not in test_librosa_compatibility. For the 4 places I found the test, backend_utils, test_io and test_dataloader both seem to be “IO” so I will not touch them. I will remove it from test_sox_effects.

Yes, that makes sense.

Second issue, I looked for test.wav accidentally checked in and did not find it.

Yes, you are right. I updated the list.

Thanks for checking the details I missed.

1reaction
mthrokcommented, Jul 11, 2020

Couple of comments:

From this test run, I learned:

  1. torchaudio/datasets/gtzan.py probably uses genres/noise/noise.0000.wav so we shouldn’t remove that. I can’t find a reference in the code though but the other files are put under genres. How does this work?

Let me get back on this one.

  1. torchaudio/datasets/yesno.py still uses waves_yesno/0_1_0_1_0_1_1_0.wav

This is my overlook. I only greped each asset name so files I did not see the files indirectly required by Dataset implementations. Thanks for pointing this out.

Are we sure we can remove steam-train-whistle-daniel_simon.mp3 ?

In file torchaudio/test/test_io.py, it seems to use this file to test MP3 reading IO.

You are right, we cannot remove the file because it’s used by test_io.py, however, the other tests test_librosa_compatibility should not be using these files and they should use wav version instead.

Update: The following applies to tests other than test_io.py We want to replace this with wav format. The reason is loading mp3 file as Tensor is a bit complicated with 3rd party libraries (the tests for non-I/O functionalities should not be using torchauiod.load), and as far as I checked, the tests that use steam-train-whistle-daniel_simon.mp3 do not have requirement to use mp3 file. So by changing it to wav, we can simplify the test logic and that allows us to run the same test on Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When to remove insignificant variables? - Cross Validated
I checked the summary of the model which is built on 5 independent variables out which one is not significant with a P-value...
Read more >
When Insignificant Results are Significant - Optimizely
When running an A/B test, you typically want to see a clear winner. But that doesn't always happen. Sometimes results are insignificant.
Read more >
5.2 Impairment of long-lived assets to be held and used
The first step in the impairment test is to determine whether the long-lived assets are recoverable, determined by comparing the net carrying ...
Read more >
Deleting test assets - IBM
In the Test Navigator, right-click the test asset, and then select Delete. The following table summarizes how deleting an asset affects the other...
Read more >
Final Rule: Amendments to Financial Disclosures ... - SEC.gov
Disclosure Requirements for Individually Insignificant Acquisitions . ... did not propose to substantively revise the Asset Test; however, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found