Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NNCF training on CPU #2373

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/otx/algorithms/common/adapters/mmcv/nncf/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ def dump_checkpoint_fn(model, compression_ctrl, nncf_runner, save_dir):
self._eval_hook._save_ckpt(self, nncf_runner.best_val_metric_value)
return self._eval_hook.best_ckpt_path

uncompressed_model_accuracy = self.model.module.nncf._uncompressed_model_accuracy
if hasattr(self.model, "module"):
sungmanc marked this conversation as resolved.
Show resolved Hide resolved
uncompressed_model_accuracy = self.model.module.nncf._uncompressed_model_accuracy
else:
uncompressed_model_accuracy = self.model.nncf._uncompressed_model_accuracy

acc_aware_training_loop = create_accuracy_aware_training_loop(
self.nncf_config,
self.compression_ctrl,
Expand Down