> ## 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.

# AgentPredictorWorker.fit

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

Freeze and package the champion agent for production.

Resolves the agent, binds encoders, re-fits the model
on the curated feature subset, and saves the deployment
artifact. After this call, the object is immutable and
ready for `transform` / `preprocess`.

#### Parameters

**`inputs`** : *`AgentPredictorInput`*
Training/test data, feature subset, and agent choice.

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

#### Returns

*`AgentPredictor`*
Fitted, deployment-ready champion agent.

#### Raises

* **`ValueError`**: If `train_set` is empty or `features` is empty.


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