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
make kaldi selective #1342
make kaldi selective #1342
Conversation
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.
Looks good. Let's resolve CI issue and it's good merge.
@@ -32,6 +32,7 @@ def _get_build(var): | |||
|
|||
|
|||
_BUILD_SOX = _get_build("BUILD_SOX") | |||
_BUILD_KALDI = _get_build("BUILD_KALDI") |
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.
Because we currently default to build Kaldi, in case the environment variable is missing, we need to default to true
for this.
Please update the _get_build
to allow override of default value.
@@ -19,6 +19,9 @@ | |||
|
|||
|
|||
def _get_build(var): | |||
if (var == "BUILD_KALDI") and not os.environ.get(var): | |||
return True | |||
|
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.
Although this works for our purpose, let's keep this function generic. How about this?
def _get_build(var, default_val=False):
if val not in os.ennviron:
return default_val
val = os.environ[var]
...
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.
good point 👍
def skipIfNoExtension(test_item): | ||
if is_module_available('torchaudio._torchaudio'): | ||
return test_item | ||
if 'TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION' in os.environ: |
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.
follow-up (@mthrok): Revive this mechanism with new semantic.
$ grep TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSIO -r .circleci/
.circleci/unittest/linux/scripts/run_test.sh:export TORCHAUDIO_TEST_FAIL_IF_NO_EXTENSION=1
support functionality to compile without kaldi, similar to #1338