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
Clean up common_utils #690
Conversation
Codecov Report
@@ Coverage Diff @@
## master #690 +/- ##
==========================================
- Coverage 89.10% 89.08% -0.03%
==========================================
Files 22 22
Lines 2341 2336 -5
==========================================
- Hits 2086 2081 -5
Misses 255 255
Continue to review full report at Codecov.
|
2a4a33b
to
6c8b1a5
Compare
6c8b1a5
to
39bd543
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about typing. Otherwise, LGTM.
@@ -1,17 +1,11 @@ | |||
import importlib.util | |||
|
|||
|
|||
def _check_module_exists(name: str) -> bool: | |||
def _check_module_exists(*modules: str) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the typing for this works? If so, I like it :)
@@ -115,12 +117,8 @@ def test_amplitude_to_DB(self): | |||
]) | |||
@pytest.mark.parametrize('rate', [0.5, 1.01, 1.3]) | |||
@pytest.mark.parametrize('hop_length', [256]) | |||
@unittest.skipIf(not LIBROSA_AVAILABLE, "Librosa not available") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing comment
thanks! |
Re-add model parallel tutorial
This PR
Removes compatibility code forRemove PY<3.4 code from common_utils #691Python < 3.4
fromtorchaudio.common_utils
.IMPORT_KALDI_IO
global variable tokaldi_io
module because it's only used there and does not seem to be useful elsewhere.IMPORT_LIBROSA
global variable to test because it's only used intest_librosa_compatibility.py
.IMPORT_NUMPY
andIMPORT_SCIPY
as they are redundant. (Iflibrosa
is availablenumpy
andscipy
should be available too, else installation is broken and that's nottorchaudio
's responsibility to watch out such case.)