Skip to content

Conversation

@mthrok
Copy link
Contributor

@mthrok mthrok commented Oct 22, 2021

Preparation for #1920

  • Make the test support other languages
  • Fetch tetst asset on-the-fly

- Make the test support other languages
- Fetch tetst asset on-the-fly
"""Smoke test of downloading weights for fine-tuning models and simple transcription"""
model = bundle.get_model().eval()
waveform, sample_rate = torchaudio.load(sample_speech_16000_en)
waveform, sample_rate = torchaudio.load(sample_speech)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this take in tmp_path and lang as parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic of pytest, which I honestly do not understand very well, will automatically apply lang to sample_speech. Also tmp_path is a fixture pytest will automatically assign.

I am honestly confused but this is how it works.

https://docs.pytest.org/en/6.2.x/example/parametrize.html#apply-indirect-on-particular-arguments

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting 😮 in that case, lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@mthrok mthrok merged commit 19d8f1c into pytorch:main Oct 22, 2021
@mthrok mthrok deleted the refactor-int-test branch October 22, 2021 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants