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

make kaldi selective #1342

Merged
merged 4 commits into from Mar 3, 2021
Merged

Conversation

carolineechen
Copy link
Contributor

support functionality to compile without kaldi, similar to #1338

Copy link
Collaborator

@mthrok mthrok left a 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")
Copy link
Collaborator

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

Copy link
Collaborator

@mthrok mthrok Mar 3, 2021

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]
    ...

Copy link
Contributor Author

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:
Copy link
Collaborator

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

@mthrok mthrok merged commit 3c44837 into pytorch:master Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants