diff --git a/mmengine/runner/runner.py b/mmengine/runner/runner.py index 9f30da624a..e2506dd8d1 100644 --- a/mmengine/runner/runner.py +++ b/mmengine/runner/runner.py @@ -2290,7 +2290,9 @@ def _log_env(self, env_cfg: dict) -> None: env_info + '\n' '\nRuntime environment:' + runtime_env_info + '\n' + dash_line + '\n') - self.logger.info(f'Config:\n{self.cfg.pretty_text}') + + if self.cfg._cfg_dict: + self.logger.info(f'Config:\n{self.cfg.pretty_text}') def _maybe_compile(self, target: str) -> None: """Use `torch.compile` to optimize model/wrapped_model."""