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

changed asr models outputs to be consistent #11818

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Ssofja
Copy link
Collaborator

@Ssofja Ssofja commented Jan 10, 2025

What does this PR do ?

This PR is making Some of ASR models outputs consistent
Collection: ASR

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • Refactoring

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

@Ssofja Ssofja force-pushed the asr_models_output_consistency branch from ed59fd2 to 3ca6a8a Compare January 15, 2025 12:43
@Ssofja Ssofja added Run CICD and removed Run CICD labels Jan 15, 2025
@Ssofja Ssofja force-pushed the asr_models_output_consistency branch from 3ca6a8a to 4232b64 Compare January 17, 2025 13:51
@Ssofja Ssofja added Run CICD and removed Run CICD labels Jan 17, 2025
Copy link
Contributor

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.


Your code was analyzed with PyLint. The following annotations have been identified:

************* Module nemo.collections.asr.metrics.bleu
nemo/collections/asr/metrics/bleu.py:37:0: C0301: Line too long (138/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:42:0: C0301: Line too long (127/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:43:0: C0301: Line too long (124/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:67:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:105:0: C0301: Line too long (151/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:109:0: C0301: Line too long (150/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:115:0: C0301: Line too long (144/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:140:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/asr/metrics/bleu.py:29:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.collections.asr.metrics.wer
nemo/collections/asr/metrics/wer.py:213:0: C0301: Line too long (138/119) (line-too-long)
nemo/collections/asr/metrics/wer.py:269:0: C0301: Line too long (151/119) (line-too-long)
nemo/collections/asr/metrics/wer.py:273:0: C0301: Line too long (150/119) (line-too-long)
nemo/collections/asr/metrics/wer.py:279:0: C0301: Line too long (144/119) (line-too-long)
nemo/collections/asr/metrics/wer.py:303:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/asr/metrics/wer.py:30:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/metrics/wer.py:347:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.collections.asr.models.aed_multitask_models
nemo/collections/asr/models/aed_multitask_models.py:694:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/aed_multitask_models.py:736:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/aed_multitask_models.py:787:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/aed_multitask_models.py:795:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/aed_multitask_models.py:1064:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/aed_multitask_models.py:1130:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/aed_multitask_models.py:46:0: W0611: Unused get_prompt_format_fn imported from nemo.collections.common.data.prompt_fn (unused-import)
nemo/collections/asr/models/aed_multitask_models.py:63:0: W0611: Unused deprecated imported from nemo.utils.decorators (unused-import)
************* Module nemo.collections.asr.models.ctc_models
nemo/collections/asr/models/ctc_models.py:197:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:198:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:809:0: C0301: Line too long (133/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:815:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:816:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:822:0: C0301: Line too long (139/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:823:0: C0301: Line too long (141/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:829:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:830:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:836:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:837:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:843:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:844:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:850:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:851:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:857:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:858:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:864:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:865:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:871:0: C0301: Line too long (140/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:872:0: C0301: Line too long (143/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:878:0: C0301: Line too long (139/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:879:0: C0301: Line too long (141/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:885:0: C0301: Line too long (151/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:886:0: C0301: Line too long (162/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:893:0: C0301: Line too long (151/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:894:0: C0301: Line too long (162/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:900:0: C0301: Line too long (139/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:901:0: C0301: Line too long (146/119) (line-too-long)
nemo/collections/asr/models/ctc_models.py:550:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:607:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:626:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:668:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:686:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:747:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:912:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/ctc_models.py:45:0: W0611: Unused deprecated imported from nemo.utils.decorators (unused-import)
************* Module nemo.collections.asr.models.hybrid_rnnt_ctc_models
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:704:0: C0301: Line too long (141/119) (line-too-long)
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:705:0: C0301: Line too long (139/119) (line-too-long)
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:16:0: W0611: Unused import json (unused-import)
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:17:0: W0611: Unused import os (unused-import)
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:18:0: W0611: Unused import tempfile (unused-import)
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:19:0: W0611: Unused Tuple imported from typing (unused-import)
nemo/collections/asr/models/hybrid_rnnt_ctc_models.py:24:0: W0611: Unused tqdm imported from tqdm.auto (unused-import)
************* Module nemo.collections.asr.models.rnnt_models
nemo/collections/asr/models/rnnt_models.py:1074:0: C0301: Line too long (164/119) (line-too-long)
nemo/collections/asr/models/rnnt_models.py:1075:0: C0301: Line too long (166/119) (line-too-long)
nemo/collections/asr/models/rnnt_models.py:231:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:710:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:808:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:826:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:894:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:902:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:1051:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:1082:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/models/rnnt_models.py:18:0: W0611: Unused Tuple imported from typing (unused-import)
nemo/collections/asr/models/rnnt_models.py:43:0: W0611: Unused NBestHypotheses imported from nemo.collections.asr.parts.utils.rnnt_utils (unused-import)
nemo/collections/asr/models/rnnt_models.py:51:0: W0611: Unused deprecated imported from nemo.utils.decorators (unused-import)
************* Module nemo.collections.asr.parts.mixins.mixins
nemo/collections/asr/parts/mixins/mixins.py:610:0: C0301: Line too long (127/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:613:0: C0301: Line too long (200/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:614:0: C0301: Line too long (129/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:619:0: C0301: Line too long (124/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:620:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:625:0: C0301: Line too long (127/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:635:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:672:0: C0301: Line too long (134/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:743:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/asr/parts/mixins/mixins.py:865:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/mixins/mixins.py:881:0: C0115: Missing class docstring (missing-class-docstring)
************* Module nemo.collections.asr.parts.submodules.ctc_decoding
nemo/collections/asr/parts/submodules/ctc_decoding.py:370:0: C0301: Line too long (136/119) (line-too-long)
nemo/collections/asr/parts/submodules/ctc_decoding.py:759:0: C0301: Line too long (151/119) (line-too-long)
nemo/collections/asr/parts/submodules/ctc_decoding.py:916:0: C0301: Line too long (125/119) (line-too-long)
nemo/collections/asr/parts/submodules/ctc_decoding.py:33:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/submodules/ctc_decoding.py:990:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/submodules/ctc_decoding.py:1001:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/submodules/ctc_decoding.py:1012:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/submodules/ctc_decoding.py:1472:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/submodules/ctc_decoding.py:1519:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/submodules/ctc_decoding.py:19:0: W0611: Unused Tuple imported from typing (unused-import)
************* Module nemo.collections.asr.parts.submodules.multitask_decoding
nemo/collections/asr/parts/submodules/multitask_decoding.py:66:0: C0301: Line too long (121/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:89:0: C0301: Line too long (125/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:114:0: C0301: Line too long (127/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:126:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:430:0: C0301: Line too long (121/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:453:0: C0301: Line too long (125/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:478:0: C0301: Line too long (127/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:599:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/asr/parts/submodules/multitask_decoding.py:164:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/submodules/multitask_decoding.py:606:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/submodules/multitask_decoding.py:15:0: W0611: Unused import re (unused-import)
************* Module nemo.collections.asr.parts.utils.streaming_utils
nemo/collections/asr/parts/utils/streaming_utils.py:426:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:429:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:473:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:546:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:569:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:632:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:644:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:658:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:671:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:680:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:685:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:777:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:783:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:787:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:824:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:842:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1506:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1515:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1521:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1525:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1537:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1542:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1549:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1584:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1587:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1597:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1608:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1612:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1683:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/asr/parts/utils/streaming_utils.py:1731:0: C0115: Missing class docstring (missing-class-docstring)
************* Module nemo.collections.multimodal.speech_cv.models.visual_ctc_models
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:146:0: C0301: Line too long (240/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:149:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:240:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:241:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:517:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:571:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:586:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:632:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_ctc_models.py:699:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.collections.multimodal.speech_cv.models.visual_hybrid_rnnt_ctc_models
nemo/collections/multimodal/speech_cv/models/visual_hybrid_rnnt_ctc_models.py:115:0: C0301: Line too long (266/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_hybrid_rnnt_ctc_models.py:217:0: C0301: Line too long (120/119) (line-too-long)
************* Module nemo.collections.multimodal.speech_cv.models.visual_rnnt_models
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:239:0: C0301: Line too long (266/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:315:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:625:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:720:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:734:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:799:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:920:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/multimodal/speech_cv/models/visual_rnnt_models.py:936:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.collections.tts.g2p.models.ctc
nemo/collections/tts/g2p/models/ctc.py:420:0: C0301: Line too long (125/119) (line-too-long)
nemo/collections/tts/g2p/models/ctc.py:49:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/tts/g2p/models/ctc.py:179:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/tts/g2p/models/ctc.py:198:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/tts/g2p/models/ctc.py:211:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/tts/g2p/models/ctc.py:215:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/tts/g2p/models/ctc.py:441:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/tts/g2p/models/ctc.py:449:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/tts/g2p/models/ctc.py:497:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module scripts.asr_language_modeling.ngram_lm.eval_beamsearch_ngram_ctc
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:19:0: C0301: Line too long (125/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:110:0: C0301: Line too long (128/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:111:0: C0301: Line too long (140/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:112:0: C0301: Line too long (137/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:115:0: C0301: Line too long (135/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:126:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:264:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_ctc.py:59:0: W0611: Unused import contextlib (unused-import)
************* Module scripts.asr_language_modeling.ngram_lm.eval_beamsearch_ngram_transducer
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:18:0: C0301: Line too long (129/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:108:0: C0301: Line too long (126/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:109:0: C0301: Line too long (140/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:111:0: C0301: Line too long (149/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:112:0: C0301: Line too long (162/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:118:0: C0301: Line too long (139/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:164:0: C0301: Line too long (245/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:227:0: C0301: Line too long (149/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:231:0: C0301: Line too long (132/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:234:0: C0301: Line too long (124/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:371:0: C0301: Line too long (121/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:124:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:242:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/asr_language_modeling/ngram_lm/eval_beamsearch_ngram_transducer.py:59:0: W0611: Unused import contextlib (unused-import)
************* Module scripts.asr_language_modeling.ngram_lm.eval_wfst_decoding_ctc
scripts/asr_language_modeling/ngram_lm/eval_wfst_decoding_ctc.py:104:0: C0301: Line too long (127/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_wfst_decoding_ctc.py:105:0: C0301: Line too long (148/119) (line-too-long)
scripts/asr_language_modeling/ngram_lm/eval_wfst_decoding_ctc.py:123:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/asr_language_modeling/ngram_lm/eval_wfst_decoding_ctc.py:256:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/asr_language_modeling/ngram_lm/eval_wfst_decoding_ctc.py:56:0: W0611: Unused import contextlib (unused-import)

-----------------------------------
Your code has been rated at 9.66/10

Mitigation guide:

  • Add sensible and useful docstrings to functions and methods
  • For trivial methods like getter/setters, consider adding # pylint: disable=C0116 inside the function itself
  • To disable multiple functions/methods at once, put a # pylint: disable=C0116 before the first and a # pylint: enable=C0116 after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

@nithinraok
Copy link
Collaborator

nithinraok commented Jan 23, 2025

Overall looks good! Thank you.
Changes required:

  1. rename return_hypotheses -> return_all_hypotheses
  2. move from draft to ready
  3. Make sure all variables from Hypotheses return None if not set previously using return_all_hypotheses
  4. update timestep to timestamp in Hypothesis object (used with timestamps=True feature)
  5. Update docs with this feature update
  6. Update PR changelog to explain changes and usage as similar to Timestamps to transcribe #10950

@Ssofja Ssofja marked this pull request as ready for review February 6, 2025 17:24
@@ -31,6 +31,7 @@
from nemo.collections.asr.parts.utils import manifest_utils
from nemo.collections.common.data.utils import move_data_to_device
from nemo.utils import logging, logging_mode
from nemo.utils.decorators import deprecated

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'deprecated' is not used.

Copilot Autofix AI 13 minutes ago

To fix the problem, we need to remove the unused import statement. This will clean up the code and remove the unnecessary dependency. The best way to fix this is to delete the line that imports deprecated from nemo.utils.decorators. This change should be made in the file nemo/collections/asr/parts/mixins/transcription.py.

Suggested changeset 1
nemo/collections/asr/parts/mixins/transcription.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/nemo/collections/asr/parts/mixins/transcription.py b/nemo/collections/asr/parts/mixins/transcription.py
--- a/nemo/collections/asr/parts/mixins/transcription.py
+++ b/nemo/collections/asr/parts/mixins/transcription.py
@@ -33,3 +33,3 @@
 from nemo.utils import logging, logging_mode
-from nemo.utils.decorators import deprecated
+
 
EOF
@@ -33,3 +33,3 @@
from nemo.utils import logging, logging_mode
from nemo.utils.decorators import deprecated


Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
tests/collections/asr/test_asr_metrics.py Fixed Show fixed Hide fixed
tests/collections/asr/test_asr_metrics.py Fixed Show fixed Hide fixed
Ssofja and others added 6 commits February 6, 2025 22:32
Signed-off-by: Ssofja <sofiakostandian@gmail.com>
Signed-off-by: Ssofja <Ssofja@users.noreply.github.com>
Signed-off-by: Ssofja <sofiakostandian@gmail.com>
Signed-off-by: Ssofja <Ssofja@users.noreply.github.com>
Signed-off-by: Ssofja <sofiakostandian@gmail.com>
Signed-off-by: Ssofja <Ssofja@users.noreply.github.com>
@Ssofja Ssofja force-pushed the asr_models_output_consistency branch from ee896e4 to 8549980 Compare February 6, 2025 18:33
nithinraok
nithinraok previously approved these changes Feb 6, 2025
Copy link
Collaborator

@nithinraok nithinraok left a comment

Choose a reason for hiding this comment

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

Few comments, otherwise LGTM

@@ -31,6 +31,7 @@
from nemo.collections.asr.parts.utils import manifest_utils
from nemo.collections.common.data.utils import move_data_to_device
from nemo.utils import logging, logging_mode
from nemo.utils.decorators import deprecated
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this as its not used

@@ -68,6 +69,14 @@ class TranscribeConfig:

_internal: Optional[InternalTranscribeConfig] = None

@property
Copy link
Collaborator

Choose a reason for hiding this comment

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

write a TODO here so as to remove later

num_workers=num_workers,
channel_selector=channel_selector,
augmentor=augmentor,
verbose=verbose,
timestamps=timestamps,
**config_kwargs,
)
transcribe_cfg.return_hypotheses = return_hypotheses
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it return_all_hypotheses here or return_hypotheses

@@ -898,7 +898,7 @@
" print(f\"[ref text]: {target_transcripts[idx]}\")\n",
" else:\n",
" # if no spotted words, use standard greedy predictions\n",
" pred_text = ctc_model.wer.decoding.ctc_decoder_predictions_tensor(greedy_predicts)[0][0]"
" pred_text = ctc_model.wer.decoding.ctc_decoder_predictions_tensor(greedy_predicts)[0]"
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't this supposed to be ctc_model.wer.decoding.ctc_decoder_predictions_tensor(greedy_predicts)[0].text?

Copy link
Collaborator

@titu1994 titu1994 left a comment

Choose a reason for hiding this comment

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

I've only glanced at it but this PR is full of breaking changes. Upto @nithinraok if he's ok with it, I don't see the reason for most of these naming changes.

@@ -116,7 +116,7 @@ def __init__(
encoder_hidden_states=predictions,
encoder_input_mask=predictions_mask,
decoder_input_ids=input_ids,
return_hypotheses=False,
return_all_hypotheses=False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we want to make this pedantic change in the name and break older inference ? Revert please

Copy link
Collaborator

Choose a reason for hiding this comment

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

We tried to handle all cases but will revert this for now as it includes other breaking changes

@@ -56,7 +57,7 @@ class InternalTranscribeConfig:
@dataclass
class TranscribeConfig:
batch_size: int = 4
return_hypotheses: bool = False
return_all_hypotheses: bool = False
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't make this pedantic change please @nithinraok

Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets revert this @Ssofja but keep timestep to timestamp change.

Signed-off-by: Ssofja <sofiakostandian@gmail.com>
@Ssofja Ssofja force-pushed the asr_models_output_consistency branch from bd17125 to 3987d43 Compare February 7, 2025 12:48
Signed-off-by: Ssofja <Ssofja@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants