Skip to content

Commit

Permalink
adding unk_token removal for the Python testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hkwon committed Aug 14, 2024
1 parent e5a2a46 commit 065b240
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tests/test_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,5 +1020,6 @@ def test_transformers_wav2vec2(

predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.decode(predicted_ids, output_word_offsets=True)
transcription = transcription[0].replace(processor.tokenizer.unk_token,'')

assert transcription[0] == expected_transcription[0]
assert transcription == expected_transcription[0]

0 comments on commit 065b240

Please sign in to comment.