Skip to content

Replace tests comparing functionality to sox with hard coded results. #4017

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

Open
wants to merge 5 commits into
base: kaldi_mock
Choose a base branch
from

Conversation

samanklesaria
Copy link
Collaborator

To eliminate the sox dependency, this PR pre-computes the result of calls in the test suite that compare functionality to sox.

@samanklesaria samanklesaria requested a review from a team as a code owner August 4, 2025 14:57
Copy link

pytorch-bot bot commented Aug 4, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4017

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 18 New Failures

As of commit 7094873 with merge base 6519052 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@samanklesaria samanklesaria changed the base branch from main to mocking August 4, 2025 14:58
@meta-cla meta-cla bot added the CLA Signed label Aug 4, 2025
if os.path.exists(path):
shutil.copyfile(path, output_file)
return

Copy link
Member

@NicolasHug NicolasHug Aug 5, 2025

Choose a reason for hiding this comment

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

IIUC the end state we want is for if os.path.exists(path): to be True, right? If it's false it means we forgot to check-in a file? If that's the case, let's not have the if part and always do

        shutil.copyfile(path, output_file)
        return

unconditionally.

I agree with your previous point that the file generation should still exist for reference, but for safety it might be best to comment it out, so that in never gets executed.

In the current state, as I understand it, if sox is available and the file doesn't exist for whatever reason, then we are effectively checking against sox's output instead of checking against a file which should exist - so we're not testing what we think we're testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Your understanding is correct! I was planning to address your point by just removing the sox dependency from the dependencies installed on CI, so that if the file was missing we'd see an error about importing the library. But I can certainly comment the generation part out if you think that's clearer.

@samanklesaria samanklesaria changed the base branch from mocking to kaldi_mock August 5, 2025 19:34
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.

2 participants