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

Make possible to control tqdm progress bar in ASR models #6375

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

SN4KEBYTE
Copy link
Contributor

What does this PR do ?

Now it's possible to control display of progress bar when calling transcribe method of ASR models.

Collection: ASR

Changelog

  • transcribe method of ASR models now have verbose param, which allows to control display of tqdm progress bar

Usage

import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained("nvidia/stt_en_conformer_transducer_xlarge")

# Will display progress bar by default
asr_model.transcribe(['2086-149220-0033.wav'])

# Won't display progress bar when verbose is set to False
asr_model.transcribe(['2086-149220-0033.wav'], verbose=False)

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:

  • New Feature
  • Bugfix
  • Documentation

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

None

@github-actions github-actions bot added the ASR label Apr 5, 2023
@titu1994
Copy link
Collaborator

titu1994 commented Apr 5, 2023

Sorry but this is by design. We don't want to disable tqdm with special args because that would need to update every single Model with those args in its transcribe function.

There are other ways to disable logging at least locally - #1376 (comment)

But tqdm wont be updated for now.

@titu1994
Copy link
Collaborator

titu1994 commented Apr 5, 2023

Ah to note - if you really need this, this is a viable alternative - https://stackoverflow.com/a/67238486

@titu1994
Copy link
Collaborator

titu1994 commented Apr 6, 2023

On second thought, let me discuss with the team. Might be a nice arg to add. We'll get back to you in some time.

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.

After discussion, seems the team is in favor of adding this.
Thanks for the PR !

@titu1994 titu1994 merged commit ae62e72 into NVIDIA:main Apr 6, 2023
@SN4KEBYTE
Copy link
Contributor Author

Thank you! I was happy to help.

hsiehjackson pushed a commit to hsiehjackson/NeMo that referenced this pull request Jun 2, 2023
* Added verbose param to control tqdm progress bar

Signed-off-by: Timur Kasimov <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Timur Kasimov <[email protected]>
Co-authored-by: Timur Kasimov <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: hsiehjackson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants