Skip to main content
Step 18: AIDflow Production Agent: The Deployment Artifact. This is the final, promoted agent destined for production inference. Unlike the ensemble agents used during training, this class encapsulates the entire ‘winning’ logic—integrating its specific fitting strategy, associated preprocessing encoders, and feature mappings into a single, deployable unit. Strategic Role:
  • Inference Encapsulation: Acts as the sole interface for production scoring, removing all ensemble complexity to provide a lean, high-performance API.
  • End-to-End Lineage: Bridges the gap between raw input data and final probability scores by internalizing the preprocessing pipeline.
  • Governance & Audit: Maintains an immutable record of selected features and encoder states, ensuring that production predictions are perfectly reproducible and compliant with model governance standards.
  • AgentPredictorWorker is automatically executed during Step 17 (Champion Promotion) based on user configuration.
  • Can be run independently to bypass Step 17 when feature tuning or overview analysis is not required.

Parameters

inputs : AgentPredictorInput
Custom selection configuration. If None, resolves from ‘train.ml’ and ‘test.ml’ state.
**kwargs : dict
Additional parameters passed to the Selector worker.
Inputs full schema can be obtained by ctx.workers.champion_predictor.spec with main params:
inputs == None→pipeline data context
train_set != None→custom train data for champion_predictor training
test_set != None→custom test data for champion_predictor test metrics
features != None→custom feature subset used for training champion_predictor

Returns

AgentPredictorWorker
The populated instance of AgentPredictorWorker.
Populates attributes into the worker context:
model→ctx.workers.champion_predictor
inputs→ctx.workers.champion_predictor.spec
result→ctx.workers.champion_predictor.result
state→ctx.workers.champion_predictor.state
report→ctx.workers.champion_predictor.report
stats→ctx.workers.champion_predictor.stats
fitter→ctx.workers.champion_predictor.fitter
Registers data into the datasets context:
predictions→predictions.train.champion_agent
predictions→predictions.test.champion_agent
features→features.champion_agent.predicted
features→features.champion_agent.selected
dropped→features.champion_agent.dropped
stats→stats.agents.champion_agent
stats→stats.agents.selection

Examples

Defining the Project Context (Control Plane) & Project Scope:

Worker → Model → Fitter

Accessing worker’s inputs schema → parameters & types (shown in the display output):
Accessing model’s fitter options and schema → parameters & types (shown in the display output):
Executing workers with defaults → auto provided by the context:
Once worker has been executed, thus its main model has been built, we have access to all populated attributes.
View to model report of executed worker:

Model → Fitter

Once worker has been executed, we can obtain internal fitter state and its parametrization (shown in the display output):
The fitted fitter provides all populated attributes.
Direct choice and parametrization of internal fitter:
In the experimenting phase, when various parametrization settings might be under testing (note that internal fitter API (fx_config) can vary with respect to chosen fitter):

Attributes

All worker attributes return None prior its execution.