Skip to content

Commit

Permalink
Remove _set_resumed_keys in update_scalars and update_info_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
HAOCHENYE committed Dec 20, 2022
1 parent 56261ca commit 662f8a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions examples/distributed_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def main():
val_dataloader=val_dataloader,
val_cfg=dict(),
val_evaluator=dict(type=Accuracy),
custom_hooks=[
dict(type='ProfilerHook', on_trace_ready=dict(type='tb_trace'))
],
launcher=args.launcher,
)
runner.train()
Expand Down
2 changes: 0 additions & 2 deletions mmengine/logging/message_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def update_scalars(self, log_dict: dict, resumed: bool = True) -> None:
assert isinstance(log_dict, dict), ('`log_dict` must be a dict!, '
f'but got {type(log_dict)}')
for log_name, log_val in log_dict.items():
self._set_resumed_keys(log_name, resumed)
if isinstance(log_val, dict):
assert 'value' in log_val, \
f'value must be defined in {log_val}'
Expand Down Expand Up @@ -232,7 +231,6 @@ def update_info_dict(self, info_dict: dict, resumed: bool = True) -> None:
assert isinstance(info_dict, dict), ('`log_dict` must be a dict!, '
f'but got {type(info_dict)}')
for key, value in info_dict.items():
self._set_resumed_keys(key, resumed)
self.update_info(key, value, resumed=resumed)

def _set_resumed_keys(self, key: str, resumed: bool) -> None:
Expand Down

0 comments on commit 662f8a5

Please sign in to comment.