Skip to content

Conversation

@jimchen90
Copy link
Contributor

@jimchen90 jimchen90 commented Jun 18, 2020

Add subclass common_utils.TorchaudioTestCase in model test classes.
Related to #705

@jimchen90 jimchen90 requested review from mthrok and vincentqb June 18, 2020 15:34
Copy link
Contributor

@vincentqb vincentqb left a comment

Choose a reason for hiding this comment

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

As mentioned here, unittest.TestCase is enough to run internal tests. LGTM.

@vincentqb
Copy link
Contributor

oops, should have waited "ready for review" :)

@jimchen90 jimchen90 marked this pull request as ready for review June 18, 2020 15:45


class TestWav2Letter:
class TestWav2Letter(unittest.TestCase):
Copy link
Contributor

@mthrok mthrok Jun 18, 2020

Choose a reason for hiding this comment

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

To stick with the latest guideline, instead of unittest.TestCase, can you use TorchaudioTestCase from common_utils?
It's available in the latest master.

assert out.size() == (batch_size, output_dims, num_features - pad * 2)

if __name__ == '__main__':
unittest.main()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit/very subjective: although it does not hurt but I personally find adding unittest.main redundant and unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

:) since the other tests have it, let's keep that line in for consistency with the other files and other domains (e.g. here), but feel free to open a pull request to discuss removing them all

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: It was added to the other files without review or approval in #509, and it is not used by any official automated jobs. So it is not very convincing to keep this for the sake of consistency.

Copy link
Contributor

@vincentqb vincentqb Jun 19, 2020

Choose a reason for hiding this comment

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

since we don't want to block this PR on this, feel free to open a separate PR to change this everywhere :)

Copy link
Contributor

Choose a reason for hiding this comment

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

@jimchen90 -- can you move this change to a separate pull request? thanks!

Copy link
Contributor Author

@jimchen90 jimchen90 Jun 21, 2020

Choose a reason for hiding this comment

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

Yes. Thanks
Related to #744

@jimchen90 jimchen90 merged commit b8ddeb3 into pytorch:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants