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

Bug fix: Progress goes 100% and back 0 % repeatedly during auto decrease bs in Geti #2074

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
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