Skip to content

Conversation

@gante
Copy link
Contributor

@gante gante commented Feb 19, 2025

What does this PR do?

@gante gante requested review from eustlb and ydshieh February 19, 2025 14:41
# compute features
input_features_no_dither = feature_extractor_no_dither(
np_speech_inputs, padding=True, return_tensors="np"
np_speech_inputs, padding=True, return_tensors="np", sampling_rate=dict_no_dither["sampling_rate"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(the sampling_rate arg is redundant when it is manually set at init time, but we throw a warning nevertheless. warnings make flake-finder runs much slower :D)

@ydshieh
Copy link
Collaborator

ydshieh commented Feb 19, 2025

I would love to leave this PR for @eustlb 🤗 but feel free to ping me if anything gets blocked for too long

Copy link
Contributor

@eustlb eustlb left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @gante.
The sampling_rate arg is indeed redundant. Nevertheless, it is well designed this way IMO to the extent that we want it as a feature-extractor level instance, to reflect the one on which the model has been trained, and we also want to have it as an argument when the feature extractor is called to ensure that the user is warned in the (very likely) case where he forgot to resample the audio.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@gante
Copy link
Contributor Author

gante commented Feb 19, 2025

(@eustlb perhaps I didn't convey my message correctly -- I agree with the warning 🤗 I wanted to clarify that this PR's diff in the lines where we call the processor exists so that we don't throw a warning at test time, which ultimately makes the flake-finder less seamless)

@gante gante merged commit fa8cdcc into huggingface:main Feb 19, 2025
20 checks passed
@gante gante deleted the dither branch February 19, 2025 15:13
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.

4 participants