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

Stop mutating input dicts in audio classification pipeline #35754

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

Rocketknight1
Copy link
Member

The audio classification pipeline was taking a dict as input and popping keys out of it, which mutates the original dict in the calling function, and is probably not what users expect. To avoid that, we copy the dict instead.

Fixes #35740

Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for fixing 👍

@Rocketknight1 Rocketknight1 merged commit 8ad6bd0 into main Jan 17, 2025
26 checks passed
@Rocketknight1 Rocketknight1 deleted the no-mutate-pipeline-input-dict branch January 17, 2025 15:41
bursteratom pushed a commit to bursteratom/transformers that referenced this pull request Jan 31, 2025
elvircrn pushed a commit to elvircrn/transformers that referenced this pull request Feb 13, 2025
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.

Giving dictionary to Audio Classification Pipeline overwrites dictionary data
2 participants