From 31e731e5aeffcdf22b4a20f7b9f716694151fe0a Mon Sep 17 00:00:00 2001 From: Michael Suo Date: Tue, 18 Oct 2022 14:58:23 -0700 Subject: [PATCH] [dynamo] fix logging (#87239) Currently, setting `torch._dynamo.config.log_level` doesn't do anything, as the module name has changed during the move. Pull Request resolved: https://github.com/pytorch/pytorch/pull/87239 Approved by: https://github.com/jansel, https://github.com/soumith, https://github.com/mlazos --- torch/_dynamo/logging.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/torch/_dynamo/logging.py b/torch/_dynamo/logging.py index 8621119a3da27..0705e77a7c7d5 100644 --- a/torch/_dynamo/logging.py +++ b/torch/_dynamo/logging.py @@ -10,8 +10,8 @@ # Return all loggers that torchdynamo/torchinductor is responsible for def get_loggers(): return [ - logging.getLogger("torchdynamo"), - logging.getLogger("torchinductor"), + logging.getLogger("torch._dynamo"), + logging.getLogger("torch._inductor"), ] @@ -37,12 +37,12 @@ def set_loggers_level(level): }, }, "loggers": { - "torchdynamo": { + "torch._dynamo": { "level": "DEBUG", "handlers": ["torchdynamo_console"], "propagate": False, }, - "torchinductor": { + "torch._inductor": { "level": "DEBUG", "handlers": ["torchdynamo_console"], "propagate": False,