diff --git a/monai/bundle/scripts.py b/monai/bundle/scripts.py index 4251da0b6f..884723ed68 100644 --- a/monai/bundle/scripts.py +++ b/monai/bundle/scripts.py @@ -1945,7 +1945,6 @@ def create_workflow( """ _args = update_kwargs(args=args_file, workflow_name=workflow_name, config_file=config_file, **kwargs) - _log_input_summary(tag="run", args=_args) (workflow_name, config_file) = _pop_args( _args, workflow_name=ConfigWorkflow, config_file=None ) # the default workflow name is "ConfigWorkflow" @@ -1969,7 +1968,7 @@ def create_workflow( workflow_ = workflow_class(**_args) workflow_.initialize() - + _log_input_summary(tag="run", args=_args) return workflow_ diff --git a/monai/bundle/workflows.py b/monai/bundle/workflows.py index d728d7d930..ccdb08e208 100644 --- a/monai/bundle/workflows.py +++ b/monai/bundle/workflows.py @@ -316,8 +316,8 @@ def __init__( else: raise FileNotFoundError(f"Cannot find the logging config file: {logging_file}.") else: - logger.info(f"Setting logging properties based on config: {logging_file}.") fileConfig(str(logging_file), disable_existing_loggers=False) + logger.info(f"Setting logging properties based on config: {logging_file}.") self.parser = ConfigParser() self.parser.read_config(f=config_file) diff --git a/monai/handlers/stats_handler.py b/monai/handlers/stats_handler.py index ab36d19bd1..c4971e9cac 100644 --- a/monai/handlers/stats_handler.py +++ b/monai/handlers/stats_handler.py @@ -74,7 +74,7 @@ def __init__( output_transform: Callable = lambda x: x[0], global_epoch_transform: Callable = lambda x: x, state_attributes: Sequence[str] | None = None, - name: str | None = "StatsHandler", + name: str | None = "monai.handlers.StatsHandler", tag_name: str = DEFAULT_TAG, key_var_format: str = DEFAULT_KEY_VAL_FORMAT, ) -> None: diff --git a/monai/networks/trt_compiler.py b/monai/networks/trt_compiler.py index 00d2eb61af..a360f63dbd 100644 --- a/monai/networks/trt_compiler.py +++ b/monai/networks/trt_compiler.py @@ -115,7 +115,7 @@ def __init__(self, plan_path, logger=None): logger: optional logger object """ self.plan_path = plan_path - self.logger = logger or get_logger("trt_compile") + self.logger = logger or get_logger("monai.networks.trt_compiler") self.logger.info(f"Loading TensorRT engine: {self.plan_path}") self.engine = engine_from_bytes(bytes_from_path(self.plan_path)) self.tensors = OrderedDict() @@ -288,7 +288,7 @@ def __init__( self.fallback = fallback self.disabled = False - self.logger = logger or get_logger("trt_compile") + self.logger = logger or get_logger("monai.networks.trt_compiler") # Normally we read input_names from forward() but can be overridden if input_names is None: @@ -563,7 +563,7 @@ def find_sub(parent, submodule): else: wrap(model, base_path) else: - logger = logger or get_logger("trt_compile") + logger = logger or get_logger("monai.networks.trt_compiler") logger.warning("TensorRT and/or polygraphy packages are not available! trt_compile() has no effect.") return model diff --git a/monai/utils/misc.py b/monai/utils/misc.py index 6386aae713..ec9b1256a2 100644 --- a/monai/utils/misc.py +++ b/monai/utils/misc.py @@ -887,7 +887,7 @@ def run_cmd(cmd_list: list[str], **kwargs: Any) -> subprocess.CompletedProcess: if kwargs.pop("run_cmd_verbose", False): import monai - monai.apps.utils.get_logger("run_cmd").info(f"{cmd_list}") # type: ignore[attr-defined] + monai.apps.utils.get_logger("monai.utils.run_cmd").info(f"{cmd_list}") # type: ignore[attr-defined] try: return subprocess.run(cmd_list, **kwargs) except subprocess.CalledProcessError as e: