Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 6a1dfd1

Browse files
committed
fix nncf statistics logging
1 parent 37ac3d6 commit 6a1dfd1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mmseg/integration/nncf/compression_hooks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def after_train_iter(self, runner):
1616

1717
def after_train_epoch(self, runner):
1818
self.compression_ctrl.scheduler.epoch_step()
19+
if runner.rank == 0:
20+
runner.logger.info(self.compression_ctrl.statistics().to_str())
1921

2022
def before_run(self, runner):
2123
if runner.rank == 0:

mmseg/integration/nncf/runners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def run(self, data_loaders, *args, compression_ctrl=None,
3939
self.logger.warning('Note that the workflow and max_epochs parameters '
4040
'are not used in NNCF-based accuracy-aware training')
4141
acc_aware_training_loop = create_accuracy_aware_training_loop(nncf_config,
42-
compression_ctrl)
42+
compression_ctrl, verbose=False)
4343
# taking only the first data loader for NNCF training
4444
self.train_data_loader = data_loaders[0]
4545
# Maximum possible number of iterations, needs for progress tracking

0 commit comments

Comments
 (0)