Skip to content

Commit

Permalink
[dynamo] fix logging (pytorch#87239)
Browse files Browse the repository at this point in the history
Currently, setting `torch._dynamo.config.log_level` doesn't do anything,
as the module name has changed during the move.
Pull Request resolved: pytorch#87239
Approved by: https://github.com/jansel, https://github.com/soumith, https://github.com/mlazos
  • Loading branch information
suo authored and pytorchmergebot committed Oct 19, 2022
1 parent 7ff1ca4 commit 31e731e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torch/_dynamo/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
]


Expand All @@ -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,
Expand Down

0 comments on commit 31e731e

Please sign in to comment.