NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

Modernize logger interface

Open emmanuel-ferdman opened this issue 5 months ago • 1 comments

What does this PR do ?

The logger.warn() method is deprecated since Python2.7 and replaced with logger.warning(). It leads to those warnings:

DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

Also, in retro_dataset.py it uses from nemo.utils import logging which does not even have .warn method available, meaning this is a bug.

Collection: asr, common, nlp.

Changelog

Modernize logger interface

Usage

  • You can potentially add a usage example below
from nemo.utils import logging
logging.warn("test is a test")

import logging
logging.warn("test is a test")

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:

  • [x] 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
  • [x] Bugfix
  • [ ] Documentation

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)

emmanuel-ferdman avatar May 30 '25 17:05 emmanuel-ferdman

@stevehuang52 looks like the CI complains on not-related linting issues in the same file. What should be done in this case?

emmanuel-ferdman avatar Jun 24 '25 11:06 emmanuel-ferdman

@stevehuang52 looks like the CI complains on not-related linting issues in the same file. What should be done in this case?

No worries, I got this

stevehuang52 avatar Jun 24 '25 15:06 stevehuang52