Skip to content

Commit

Permalink
remove hpo
Browse files Browse the repository at this point in the history
Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
  • Loading branch information
ashwinvaidya17 committed Feb 4, 2025
1 parent 3c651b7 commit a7521bf
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 5,053 deletions.
12 changes: 0 additions & 12 deletions src/otx/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

from otx.core.config.device import DeviceConfig
from otx.core.config.explain import ExplainConfig
from otx.core.config.hpo import HpoConfig
from otx.core.data.module import OTXDataModule
from otx.core.model.base import OTXModel, OVModel
from otx.core.types import PathLike
Expand All @@ -35,7 +34,6 @@
from otx.utils.utils import measure_flops

from .adaptive_bs import adapt_batch_size
from .hpo import execute_hpo, update_hyper_parameter
from .utils.auto_configurator import DEFAULT_CONFIG_PER_TASK, AutoConfigurator

if TYPE_CHECKING:
Expand Down Expand Up @@ -166,8 +164,6 @@ def train(
logger: Logger | Iterable[Logger] | bool | None = None,
resume: bool = False,
metric: MetricCallable | None = None,
run_hpo: bool = False,
hpo_config: HpoConfig = HpoConfig(), # noqa: B008 https://github.com/omni-us/jsonargparse/issues/423
checkpoint: PathLike | None = None,
adaptive_bs: Literal["None", "Safe", "Full"] = "None",
**kwargs,
Expand Down Expand Up @@ -239,14 +235,6 @@ def train(
if adaptive_bs != "None":
adapt_batch_size(engine=self, **locals(), not_increase=(adaptive_bs != "Full"))

if run_hpo:
best_config, best_trial_weight = execute_hpo(engine=self, **locals())
if best_config is not None:
update_hyper_parameter(self, best_config)
if best_trial_weight is not None:
checkpoint = best_trial_weight
resume = True

if seed is not None:
seed_everything(seed, workers=True)

Expand Down
9 changes: 0 additions & 9 deletions src/otx/engine/hpo/__init__.py

This file was deleted.

Loading

0 comments on commit a7521bf

Please sign in to comment.