Skip to content

boxmot.engine.tuning.backends.base

Abstract base class for tune search backends.

BaseTuneBackend

BaseTuneBackend(
    *,
    yaml_cfg: dict,
    opt_metrics: list[str],
    opt_modes: list[str],
    baseline_config: dict[str, Any] | None = None,
    seed: int | None = None,
    max_concurrent: int = 4,
)

Bases: ABC

Interface that all tune search backends must implement.

Subclasses are responsible for constructing the Ray Tune search algorithm and the param_space dict passed to tune.Tuner.

baseline_config instance-attribute

baseline_config = baseline_config

max_concurrent instance-attribute

max_concurrent = max_concurrent

opt_metrics instance-attribute

opt_metrics = opt_metrics

opt_modes instance-attribute

opt_modes = opt_modes

seed instance-attribute

seed = seed

yaml_cfg instance-attribute

yaml_cfg = yaml_cfg

build abstractmethod

build(tune) -> tuple[Any | None, dict[str, Any]]

Return (search_alg, param_space) for Ray Tune.

Parameters

tune : module The ray.tune module (passed to avoid import at class definition time).

Returns

search_alg : ConcurrencyLimiter | None Wrapped searcher, or None for random search. param_space : dict Flat dict of Ray Tune samplers (empty when the searcher owns the space).

filter_supported_kwargs staticmethod

filter_supported_kwargs(
    callable_obj: Any, kwargs: dict[str, Any]
) -> dict[str, Any]

Drop kwargs that are not accepted by the installed Ray searcher version.