提交 7775abd7 编写于 作者: H Hui Zhang

fix prof switch

上级 a40312b6
......@@ -200,10 +200,8 @@ class Trainer():
batch_sampler.set_epoch(self.epoch)
def after_train_batch(self):
if self.args.profiler_options:
profiler.add_profiler_step(self.args.profiler_options)
if self.args.benchmark_max_step and self.iteration > self.args.benchmark_max_step:
profiler.add_profiler_step(self.args.profiler_options)
logger.info(
f"Reach benchmark-max-step: {self.args.benchmark_max_step}")
sys.exit(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册