Skip to content

DARTS Search Pipeline

This page maps the conceptual DARTS workflow onto the actual ForeBlocks modules.

Why this pipeline exists

ForeBlocks does not treat DARTS as a single opaque training call. The search stack is deliberately staged so you can:

  • prune bad candidates early with cheap signals
  • spend short differentiable-search budgets only on promoted candidates
  • derive a discrete architecture explicitly
  • retrain the final model from scratch when desired

That structure makes it easier to debug, benchmark, and reason about the search than a monolithic NAS loop.

Phase-to-module map

PhaseMain code locationRole
search-space definitiondarts/config.pydefines architecture modes, op pools, and search budgets
candidate generationdarts/search/orchestrator.pysamples candidate configs and coordinates evaluation
zero-cost rankingdarts/search/zero_cost.pycomputes cheap pre-training metrics
bilevel search trainingdarts/training/darts_loop.pyruns the mixed-architecture DARTS phase
multi-fidelity orchestrationdarts/search/multi_fidelity.pypromotes top candidates and manages staged budgets
final fixed-model retrainingdarts/training/final_trainer.pyretrains the derived architecture
result analysisdarts/evaluation/analyzer.pybuilds search-result summaries and plots
public entry surfacedarts/trainer.pyexposes the staged workflow as DARTSTrainer methods

Public control flow

The high-level path is:

  1. instantiate DARTSTrainer
  2. call multi_fidelity_search(...)
  3. inspect the returned candidates and final metrics
  4. save the best final model

Internally, the call chain is roughly:

text
DARTSTrainer.multi_fidelity_search(...)
  -> search/multi_fidelity.py
      -> search/orchestrator.py
      -> search/zero_cost.py
      -> training/darts_loop.py
      -> trainer.derive_final_architecture(...)
      -> training/final_trainer.py

MIT License