autointent.advisor.run_preflight#

autointent.advisor.run_preflight(config, stats, hardware, *, preset_name=None, refit_after=False, embedding_cache_probe=None)#

Run all three preflight phases and return one report.

Parameters:
  • config (dict[str, Any]) – parsed preset / OptimizationConfig dict (top-level keys: search_space, hpo_config, optional embedder_config, optional logging_config.dump_modules).

  • stats (autointent.advisor._report.DatasetStats) – dataset statistics (real or placeholder).

  • hardware (autointent.advisor._hardware.HardwareProfile) – detected hardware profile.

  • preset_name (str | None) – optional friendly name for the report header.

  • refit_after (bool) – matches the Pipeline.fit(refit_after=...) argument. When True, time estimates include the extra refit-on-full-data pass.

  • embedding_cache_probe (collections.abc.Callable[[str], bool] | None) – optional callable (embedder_model_name) -> bool. Return True when the embedding cache already holds this model’s embeddings for the current dataset — the advisor then predicts 0 forward time and 0 disk_embedding_cache_gb for that embedder (mirrors the cached_locally treatment for HF weights). Default is the pessimistic cold assumption every embedder pays once.

Returns:

PreflightReport with findings across resource / data / config phases.

Return type:

autointent.advisor._report.PreflightReport