Skip to content

logging error with 1.2.0 version #6172

@cosmoquester

Description

@cosmoquester

🐛 Bug

if I use logger named "lightning", logger print log twice.
It happens with pytorch-lightning 1.2.0 version and doesn't happend with 1.1.8 version.
This is reproduced easily like below.

Error Example

Type "help", "copyright", "credits" or "license" for more information.
>>> import pytorch_lightning as pl
>>> import logging
>>> logger = logging.getLogger("lightning")
>>> logger.info("test")
test
>>> logging.basicConfig(level=logging.INFO)
>>> logger.info("test")
test
INFO:lightning:test
>>> pl.__version__
'1.2.0'
>>> import pytorch_lightning as pl
>>> import logging
>>> logger = logging.getLogger("lightning")
>>> logger.info("test")
>>> logging.basicConfig(level=logging.INFO)
>>> logger.info("test")
INFO:lightning:test
>>> pl.__version__
'1.1.8'

Please reproduce using the BoringModel

Don't need model.

To Reproduce

Refer above codes 1.2.0 version

Expected behavior

Refer above codes 1.1.8 version

Environment

  • PyTorch Version (e.g., 1.0): 1.2.0
  • OS (e.g., Linux): Ubuntu 20.04.1 LTS
  • How you installed PyTorch (conda, pip, source): pip
  • Build command you used (if compiling from source):
  • Python version: 3.7,9
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

Additional context

Metadata

Metadata

Assignees

Labels

docsDocumentation relatedhelp wantedOpen to be worked onloggingRelated to the `LoggerConnector` and `log()`working as intendedWorking as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions