Skip to content

Add max_len arg to fake_speech_source(). #1216

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

Merged
merged 1 commit into from
May 30, 2025
Merged

Add max_len arg to fake_speech_source(). #1216

merged 1 commit into from
May 30, 2025

Conversation

ds-hwang
Copy link
Contributor

fake_speech_source() generates extremely short fake audio samples (lengths like 1, 2, 3 and so on), which causes gradients to be zero in gradient unit tests.

@ds-hwang ds-hwang requested review from ruomingp, markblee and a team as code owners May 27, 2025 18:55
@ds-hwang ds-hwang enabled auto-merge May 27, 2025 18:59
@ds-hwang
Copy link
Contributor Author

@markblee Could you review? From 1365

@ds-hwang ds-hwang force-pushed the fake branch 7 times, most recently from d5f1695 to e72365c Compare May 30, 2025 16:44
@@ -216,7 +216,7 @@ def test_visualize(self, input_shape: Sequence[int], **kwargs):
outputs = self._generate_masks(
dict(inputs=inputs, paddings=paddings), is_training=True, **kwargs
)
# pylint: disable-next=import-outside-toplevel
# pylint: disable-next=import-outside-toplevel,import-error
import matplotlib.pyplot as plt
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need # pytype: disable=import-error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think # pylint: disable-next=import-outside-toplevel,import-error contain # pytype: disable=import-error.
Let me see CI work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. # pylint: disable-next=import-error doesn't work as it's pytype error.
I added # pytype: disable=import-error.

fake_speech_source() generates extremely short fake audio samples (lengths like
1, 2, 3 and so on), which causes gradients to be zero in gradient unit tests.
@ds-hwang ds-hwang added this pull request to the merge queue May 30, 2025
Merged via the queue into main with commit 644ef3a May 30, 2025
11 checks passed
@ds-hwang ds-hwang deleted the fake branch May 30, 2025 21:14
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.

2 participants