Skip to content

Commit

Permalink
[Enhancement] Do not print config if it is empty (open-mmlab#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida authored Mar 29, 2023
1 parent 26a7a92 commit b3b1e11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mmengine/runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit b3b1e11

Please sign in to comment.