transformers
transformers copied to clipboard
Add FlaxWhisperForAudioClassification model
What does this PR do?
Fix : #21779
Please review and let me know changes @sanchit-gandhi
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.
Modelling code looks good @raghavanone! Nice one on getting this working so quickly 🙌 Do you want to have a go at adding the encoder-only tests? See the PyTorch WhisperForAudioClassficiation PR for details, think you can also add these quite quickly :)
I have added the Encoder tests, But some test are failing, The FlaxWhisperForAudioClassification class extends FlaxWhisperPreTrainedModel . Due to this inheritance, the call method expects decoder related params.
Should the FlaxWhisperForAudioClassification not extend FlaxWhisperPreTrainedModel instead create a new pretrainedclass ?
Hey @raghavanone! The PyTorch model has just been merged (https://github.com/huggingface/transformers/pull/21754), so you can rebase onto main to get the required config changes:
git fetch upstream
git rebase upstream/main
This will fix the failing Flax tests we're getting here: https://app.circleci.com/pipelines/github/huggingface/transformers/58972/workflows/2388bd70-553e-412f-9ee7-0599cace5639/jobs/719829
The only thing to make sure is that the first time you push after rebasing, you force push to origin:
git add .
git commit -m "Some new changes after rebase"
git push -f origin fix_issue_21779
You only have to force push once, the next time you can just regular push:
git add .
git commit -m "Some more changes"
git push -u origin fix_issue_21779
@sanchit-gandhi There are 2 test failing here, I am unable to get the same failure locally in my machine. Any pointers on how to replicate failing test and fix it ?
Hey @raghavanone! Would you mind going through the previous review comments and marking them as resolved where you've addressed them? I'll then get you a final review asap! Thanks!
Hey @raghavanone - I think the commit history has been corrupted for this PR? Gentle reminder that one must force push after rebasing: https://github.com/huggingface/transformers/pull/21894#issuecomment-1458359220 Think this is probably the culprit for the 250 extra commits!
In this instance, it's probably best to close this PR in favour of a new one that only contains the new changes you with to merge. Sorry about that!
Closing in favour of #22883