Skip to content

Commit

Permalink
Fix a wrong HPO log (#3972)
Browse files Browse the repository at this point in the history
* fix wrong log

* fix wrong hpo log
  • Loading branch information
eunwoosh authored Sep 23, 2024
1 parent 40f5ddd commit 0e2ab6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/otx/engine/hpo/hpo_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@ def _adapt_batch_size_search_space(self, adapt_mode: Literal["Safe", "Full"]) ->

self._engine.datamodule.train_subset.batch_size = origin_bs
self._engine.model.optimizer_callable.optimizer_kwargs["lr"] = origin_lr # type: ignore[attr-defined]
logger.info(
"Max value of batch size search space : "
f"{self._hpo_config['search_space']['datamodule.train_subset.batch_size']['max']} -> {adapted_bs}",
)
self._hpo_config["search_space"]["datamodule.train_subset.batch_size"]["max"] = adapted_bs
logger.info(f"Max value of batch size search space : {origin_bs} -> {adapted_bs}")

@staticmethod
def _remove_wrong_search_space(search_space: dict[str, dict[str, Any]]) -> None:
Expand Down

0 comments on commit 0e2ab6c

Please sign in to comment.