Skip to content

Commit

Permalink
Fix auto adapt batch size in Converter (#3939)
Browse files Browse the repository at this point in the history
* Enable auto adapt batch size into converter

* Fix wrong
  • Loading branch information
harimkang authored Sep 9, 2024
1 parent 8b747f9 commit d43226e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/otx/tools/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ def update_use_adaptive_interval(param_value: bool) -> None:
def update_auto_num_workers(param_value: bool) -> None:
config["data"]["auto_num_workers"] = param_value

def update_auto_adapt_batch_size(param_value: str) -> None:
config["adaptive_bs"] = param_value

def update_enable_tiling(param_value: bool) -> None:
config["data"]["tile_config"]["enable_tiler"] = param_value
if param_value:
Expand Down Expand Up @@ -312,11 +315,12 @@ def update_enable_tiling(param_value: bool) -> None:
"use_adaptive_interval": update_use_adaptive_interval,
"auto_num_workers": update_auto_num_workers,
"enable_tiling": update_enable_tiling,
"auto_adapt_batch_size": update_auto_adapt_batch_size,
}
for param_name, param_value in param_dict.items():
update_func = param_update_funcs.get(param_name)
if update_func:
update_func(param_value)
update_func(param_value) # type: ignore[operator]
unused_params.pop(param_name)

warn("Warning: These parameters are not updated", stacklevel=1)
Expand Down

0 comments on commit d43226e

Please # to comment.