Skip to content

Commit

Permalink
Update profiler_hook.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida committed May 26, 2023
1 parent d4178f3 commit 9c86628
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mmengine/hooks/profiler_hook.py
Expand Up @@ -233,8 +233,7 @@ def after_train_epoch(self, runner):
self._export_chrome_trace(runner)

def after_train_iter(self, runner, batch_idx, data_batch, outputs):
"""Update the content according to the schedule, and determine if the
content is exported."""
"""profiler will call `step` method if it is not closed."""
if not self._closed:
self.profiler.step()
if runner.iter == self.profile_times - 1 and not self.by_epoch:
Expand Down

0 comments on commit 9c86628

Please sign in to comment.