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

Separate CPU and GPU tests for functions torchscript test + Fix devices in two functionals #528

Merged
merged 2 commits into from Apr 9, 2020

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Apr 9, 2020

Similar to #520 this PR make

  1. torchscript consistency test on functional module device aware
  2. Define the above test for CPU and GPU
  3. Fix some device compatibility issues in functional module found in Step 2.

Relates to #515

@mthrok mthrok requested a review from vincentqb April 9, 2020 20:04
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.

Is it possible to decouple the changes? There's a test that's failing.

test/test_functional.py::test_mask_along_axis_iid[3-0.0-100-specgrams0] FAILED [ 97%]

@mthrok
Copy link
Collaborator Author

mthrok commented Apr 9, 2020

That test only failed on PY3.6 and it succeeded after re-run, meaning that the test is flaky.
The randomness in mask_along_axis_iid function and in the test_functional.py are causing it.

The proper fix will be to set random seed in test_functional.py. I created a PR for that.

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.

LGTM

f_max = 20.0
n_mels = 10
sample_rate = 16000
if self.device != torch.device('cpu'):
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It would have been nice to have a decorator like @onlyCPU that checks this.

n_mfcc = 40
n_mels = 128
norm = "ortho"
if self.device != torch.device('cpu'):
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@vincentqb vincentqb changed the title Separate CPU and GPU tests for functions torchscript test Separate CPU and GPU tests for functions torchscript test + Fix devices in two functionals Apr 9, 2020
@vincentqb vincentqb merged commit d41d30a into pytorch:master Apr 9, 2020
@mthrok mthrok deleted the refactor-functional-test-gpu branch April 10, 2020 14:50
mthrok added a commit to mthrok/audio that referenced this pull request Apr 10, 2020
This lfilter tests were moved to `test_torchscript_consistency.py` in pytorch#507 and GPU tests were added in pytorch#528.
We can safely remove this tests from `test_functional_filtering.py`.
mthrok added a commit to mthrok/audio that referenced this pull request Apr 10, 2020
This lfilter tests were moved to `test_torchscript_consistency.py` in pytorch#507 and GPU tests were added in pytorch#528.
We can safely remove this tests from `test_functional_filtering.py`.
mthrok added a commit to mthrok/audio that referenced this pull request Apr 13, 2020
This lfilter tests were moved to `test_torchscript_consistency.py` in pytorch#507 and GPU tests were added in pytorch#528.
We can safely remove this tests from `test_functional_filtering.py`.
mthrok added a commit to mthrok/audio that referenced this pull request Apr 13, 2020
This lfilter tests were moved to `test_torchscript_consistency.py` in pytorch#507 and GPU tests were added in pytorch#528.
We can safely remove this tests from `test_functional_filtering.py`.
mthrok added a commit to mthrok/audio that referenced this pull request Apr 14, 2020
This lfilter tests were moved to `test_torchscript_consistency.py` in pytorch#507 and GPU tests were added in pytorch#528.
We can safely remove this tests from `test_functional_filtering.py`.
vincentqb pushed a commit that referenced this pull request Apr 14, 2020
This lfilter tests were moved to `test_torchscript_consistency.py` in #507 and GPU tests were added in #528.
We can safely remove this tests from `test_functional_filtering.py`.
mthrok pushed a commit to mthrok/audio that referenced this pull request Feb 26, 2021
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