Skip to content

Commit

Permalink
Bug fix: Progress goes 100% and back 0 % repeatedly during auto decre…
Browse files Browse the repository at this point in the history
…ase bs in Geti (openvinotoolkit#2074)

* disable OTXProgressHook

* align with pre commit
  • Loading branch information
eunwoosh authored and goodsong81 committed Apr 27, 2023
1 parent 99b50b8 commit 1b3ba85
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions otx/algorithms/common/adapters/mmcv/utils/automatic_bs.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ def train_func_single_iter(batch_size):
else:
copied_cfg.runner["max_epochs"] = 1

if not validate: # disable validation
for hook in copied_cfg.custom_hooks:
if hook["type"] == "AdaptiveTrainSchedulingHook":
hook["enable_eval_before_run"] = False
otx_prog_hook_idx = None
for i, hook in enumerate(copied_cfg.custom_hooks):
if not validate and hook["type"] == "AdaptiveTrainSchedulingHook":
hook["enable_eval_before_run"] = False
elif hook["type"] == "OTXProgressHook":
otx_prog_hook_idx = i

if otx_prog_hook_idx is not None:
del copied_cfg.custom_hooks[otx_prog_hook_idx]

new_datasets = [SubDataset(datasets[0], batch_size)]

Expand Down

0 comments on commit 1b3ba85

Please sign in to comment.