> ## Documentation Index
> Fetch the complete documentation index at: https://aidflow.aigensys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AgentSelectorWorker.fit

**def AgentSelectorWorker.fit**(self, inputs, fx\_choice=REG.AIG, \*\*params) [\[source\]](https://github.com/aigensys-labs/aidflow/blob/main/AID/\TRUENAS\aig_modeling_Products\AID\1_0_Lib\AID\selector\select\agent_selector.py#L551)

Execute the full champion selection pipeline.

Evaluates all agents on the provided data, computes the
diagnostic bundle (performance, SHAP drift, Gini path,
permutation importance), fits the champion agent, and
produces the complete audit package.

#### Parameters

**`inputs`** : *`AgentSelectorInput`*
Input data (OOT/test set) and the champion predictor\
reference.

**`fx_choice`** : *`str`*
Fitter choice key.

**`**params`** : *`dict`*
Runtime parameter overrides, passed to the internal fitter\
(select\_alpha, select\_bins, select\_choice).

#### Returns

*`AgentSelector`*
The fitted selector instance holding the promoted champion agent.

> [!NOTE]
>
> **Champion Fit**: The champion is fitted via
> `AgentPredictor` — it re-fits the model on the selected
> feature subset and binds the preprocessing encoders.
> The result is a self-contained deployment artifact.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.