Skip to content

[ASR] Replace print() with NeMo logging in utility modules#15700

Open
shivansh023023 wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
shivansh023023:refactor/replace-print-with-logging-asr-utils
Open

[ASR] Replace print() with NeMo logging in utility modules#15700
shivansh023023 wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
shivansh023023:refactor/replace-print-with-logging-asr-utils

Conversation

@shivansh023023
Copy link
Copy Markdown

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 3 print() calls with logging.info()/logging.warning() calls
  • streaming_utils.py: Replaced 7 print() calls with appropriate logging levels; updated import logging to from nemo.utils import logging
  • transcribe_utils.py: Replaced 5 print() calls with logging.info()/logging.warning() calls
    All 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] message

Example (before):

print("Processing complete.")

Example (after):

logging.info("Processing complete.")
# Output: [NeMo I 2026-05-14 12:34:56 vad_utils:123] Processing complete.

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:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests? — No tests needed (refactor only, no behavior change)
  • Did you add or update any necessary documentation? — No documentation changes needed
  • Does the PR affect components that are optional to install? — No
    PR Type:
  • New Feature
  • Bugfix
  • Documentation / Code Style

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.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 14, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@shivansh023023 shivansh023023 force-pushed the refactor/replace-print-with-logging-asr-utils branch from 6df6502 to 93e5c97 Compare May 14, 2026 11:04
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>
@shivansh023023 shivansh023023 force-pushed the refactor/replace-print-with-logging-asr-utils branch from 93e5c97 to ec6ae83 Compare May 14, 2026 11:05
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASR community-request waiting-on-maintainers Waiting on maintainers to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants