Skip to content

Commit d43226e

Browse files
authored
Fix auto adapt batch size in Converter (#3939)
* Enable auto adapt batch size into converter * Fix wrong
1 parent 8b747f9 commit d43226e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/otx/tools/converter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ def update_use_adaptive_interval(param_value: bool) -> None:
276276
def update_auto_num_workers(param_value: bool) -> None:
277277
config["data"]["auto_num_workers"] = param_value
278278

279+
def update_auto_adapt_batch_size(param_value: str) -> None:
280+
config["adaptive_bs"] = param_value
281+
279282
def update_enable_tiling(param_value: bool) -> None:
280283
config["data"]["tile_config"]["enable_tiler"] = param_value
281284
if param_value:
@@ -312,11 +315,12 @@ def update_enable_tiling(param_value: bool) -> None:
312315
"use_adaptive_interval": update_use_adaptive_interval,
313316
"auto_num_workers": update_auto_num_workers,
314317
"enable_tiling": update_enable_tiling,
318+
"auto_adapt_batch_size": update_auto_adapt_batch_size,
315319
}
316320
for param_name, param_value in param_dict.items():
317321
update_func = param_update_funcs.get(param_name)
318322
if update_func:
319-
update_func(param_value)
323+
update_func(param_value) # type: ignore[operator]
320324
unused_params.pop(param_name)
321325

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

0 commit comments

Comments
 (0)