forked from NVIDIA/NeMo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling invalid audio generations (for DPO) (#43)
* test_step(): handle invalid audio When the model generates an output that is very short (less than 2 ASR frames) the ASR and SSIM calculations will error out. We detect the error and invalidate the entire batch, setting WER/CER to 100% and SSIM to 0.0. The transcription is set to "<INVALID">. Note the metrics still written out to the `.metrics` files; they need to be ignored by any subsequent statistics calculations. * DPO: changes to preference pair creation 1. Skip groups that have any invalid records. 2. Allow the number of records to exactly match the number of audio files (vs requiring it to be strictly smaller). 3. Add `tqdm` to incidatea progress during long loops. * Comment * Fix merge issues and a bug Refining the handling of invalid entries in DPO preference selection. * Fix merge issues
- Loading branch information
Showing
2 changed files
with
52 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters