Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid "-" symbol in test name #822

Merged
merged 1 commit into from Jul 23, 2020
Merged

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Jul 23, 2020

Buck is not happy when test name contains "-" symbol, and it fails to run these tests.

Buck is not happy when test name contains "-" sign.
@mthrok mthrok changed the title Avoid "-" sign in test name Avoid "-" symbol in test name Jul 23, 2020
@codecov
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #822 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #822      +/-   ##
==========================================
- Coverage   89.99%   89.95%   -0.04%     
==========================================
  Files          35       35              
  Lines        2719     2719              
==========================================
- Hits         2447     2446       -1     
- Misses        272      273       +1     
Impacted Files Coverage Δ
torchaudio/_internal/module_utils.py 92.59% <0.00%> (-3.71%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1def3fa...adef62f. Read the comment docs.

@mthrok mthrok marked this pull request as ready for review July 23, 2020 21:00
@mthrok mthrok requested a review from vincentqb July 23, 2020 21:01
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.

What are the side effects of this? and what would be an alternative solution?

The impact of this PR is small, so LGTM.

@@ -62,7 +62,7 @@ def test_wav(self, dtype, sample_rate, num_channels):
[8000, 16000],
[1, 2],
[-4.2, -0.2, 0, 0.2, 96, 128, 160, 192, 224, 256, 320],
)), name_func=name_func)
)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify how this is working around the issue?

Copy link
Collaborator Author

@mthrok mthrok Jul 23, 2020

Choose a reason for hiding this comment

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

parameterized by default generates simple test names like test_foo_1, test_foo_2, test_foo_3 ...

but since I generate a whole lot of tests, this default naming convention is not very helpful when some of them fail on CI. name_func here changes the naming convention to simply stringify parameters and concatenate them as test name, which is why "-" symbol is included in the test name.

The code change in this PR gives up the custom naming function and use the default naming convention.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know. Are you intentionally leaving some of the custom naming conventions in the other functions?

Copy link
Collaborator Author

@mthrok mthrok Jul 23, 2020

Choose a reason for hiding this comment

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

Yes, they work well in places other than buck or as long as "-" symbol is not included

@mthrok mthrok merged commit 6897aff into pytorch:master Jul 23, 2020
@mthrok mthrok deleted the tweak-smoke-test branch July 23, 2020 22:17
@mthrok
Copy link
Collaborator Author

mthrok commented Jul 23, 2020

thanks

mthrok pushed a commit to mthrok/audio that referenced this pull request Feb 26, 2021
Remove PyTorch 1.2 notes in tutorials
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.

None yet

2 participants