[ASR] Replace print() with NeMo logging in utility modules#15700
Open
shivansh023023 wants to merge 1 commit into
Open
[ASR] Replace print() with NeMo logging in utility modules#15700shivansh023023 wants to merge 1 commit into
shivansh023023 wants to merge 1 commit into
Conversation
6df6502 to
93e5c97
Compare
Replaces 15 bare print() calls across three ASR utility files with the NeMo logger (from nemo.utils import logging) as required by CONTRIBUTING.md rule NVIDIA-NeMo#11: 'Loggers are preferred to print.' - vad_utils.py: 3 calls replaced - streaming_utils.py: 7 calls replaced (stdlib logging import updated) - transcribe_utils.py: 5 calls replaced Logging levels assigned based on message severity (info/warning/debug). Signed-off-by: Shivansh Singh <singhshivansh023@gmail.com> Signed-off-by: Hackathon User <hackathon@example.com>
93e5c97 to
ec6ae83
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Replaces 15 bare
print()calls with the NeMo logger across three ASR utility modules, as required by CONTRIBUTING.md rule #11: "Loggers are preferred to print."Collection: ASR
Changelog
vad_utils.py: Replaced 3print()calls withlogging.info()/logging.warning()callsstreaming_utils.py: Replaced 7print()calls with appropriate logging levels; updatedimport loggingtofrom nemo.utils import loggingtranscribe_utils.py: Replaced 5print()calls withlogging.info()/logging.warning()callsAll logging levels assigned based on message severity (info for status updates, warning for edge cases/fallbacks).
Usage
No API changes. Users will see identical log output, now with NeMo's standard formatting:
[NeMo I/W/E timestamp module:line] messageExample (before):
Example (after):
GitHub Actions CI
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
Before your PR is "Ready for review"
Pre checks:
PR Type:
Additional Information
Relates to CONTRIBUTING.md rule #11: "Loggers are preferred to print. In NeMo, you can use logger from
from nemo.utils import logging."No breaking changes. Fully backward compatible — users see the same information, just in NeMo's standard log format.