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

Adopt PyTorch's test util to torchscript test #640

Merged
merged 2 commits into from May 14, 2020

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented May 14, 2020

@cpuhrsch

Part 1 of PyTorch test framework adaptation. Applied to torchscript tests and some functional test.
If this looks good, I will expand the adaptation to other tests.

@mthrok mthrok requested a review from cpuhrsch May 14, 2020 15:27
@mthrok mthrok marked this pull request as ready for review May 14, 2020 15:27
@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #640 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #640   +/-   ##
=======================================
  Coverage   88.82%   88.82%           
=======================================
  Files          21       21           
  Lines        2220     2220           
=======================================
  Hits         1972     1972           
  Misses        248      248           

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 9835db7...cc81618. Read the comment docs.

@@ -209,7 +197,7 @@ def func(tensor):

def test_lfilter(self):
if self.dtype == torch.float64:
pytest.xfail("This test is known to fail for float64")
raise unittest.SkipTest("This test is known to fail for float64")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd make this a decorator then and have separate tests for each dtype

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that's outside of the scope of this PR.

@cpuhrsch cpuhrsch merged commit 2c28b74 into pytorch:master May 14, 2020
@vincentqb
Copy link
Contributor

vincentqb commented May 14, 2020

Following this PR, with pytorch 1.5.0 I get the following.

Traceback (most recent call last):
  File "test/test_librosa_compatibility.py", line 17, in <module>
    import common_utils
  File "/Users/vincentqb/audio/test/common_utils.py", line 9, in <module>
    from torch.testing._internal.common_utils import TestCase
ModuleNotFoundError: No module named 'torch.testing._internal'

I'm assuming this is only compatible with nighlties?

@vincentqb
Copy link
Contributor

I'm assuming this is only compatible with nighlties?

offline follow-up with @mthrok -- yup.

bhargavkathivarapu pushed a commit to bhargavkathivarapu/audio that referenced this pull request May 19, 2020
@mthrok mthrok mentioned this pull request Jun 4, 2020
2 tasks
mthrok pushed a commit to mthrok/audio that referenced this pull request Feb 26, 2021
scheduler.step() per epoch not per batch
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

3 participants