Skip to content

Commit

Permalink
Fix log_input_summary
Browse files Browse the repository at this point in the history
Signed-off-by: Ted.Lai <hyacinth97122@gmail.com>
  • Loading branch information
hyacinth97223 committed Sep 23, 2024
1 parent 7eb7b79 commit 69001d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from collections.abc import Mapping, Sequence
from datetime import datetime
from functools import partial
from logging import LoggerAdapter
from pathlib import Path
from pydoc import locate
from shutil import copyfile
Expand Down Expand Up @@ -160,7 +161,7 @@ def _log_input_summary(tag: str, args: dict, log_all_ranks: bool = False) -> Non
console_handler.setFormatter(formatter)
logger.addHandler(console_handler)

logger = logging.LoggerAdapter(logger, {"rank": rank})
logger: LoggerAdapter = logging.LoggerAdapter(logger, {"rank": rank})

formatted_args = {
name: ", ".join(map(str, val)) if isinstance(val, (list, tuple, dict)) else val
Expand Down

0 comments on commit 69001d7

Please sign in to comment.