vipr.plugins.inference.steps package¶
Submodules¶
vipr.plugins.inference.steps.load_data_step module¶
LoadDataStep implementation for the workflow.
This file implements the LoadDataStep class, which is responsible for loading data from a source for further processing.
- class vipr.plugins.inference.steps.load_data_step.LoadDataInferenceStep(app)¶
Bases:
AbstractInferenceStep[DataSet]Step 1: Load Data — reads raw data via a configured DataLoader handler.
run(**config_overrides) -> DataSet
**config_overrides → merged into YAML config via _merge_config
- Hooks: Filters:
PRE_PRE (app, params: dict) PRE dict -> dict POST_PRE (app, params: dict) POST DataSet -> DataSet PRE_POST (app, data: DataSet) POST_POST (app, data: DataSet)
Config: inference.load_data.handler / .parameters
vipr.plugins.inference.steps.load_model_step module¶
LoadModelStep implementation for the workflow.
This file implements the LoadModelStep class, which is responsible for loading the model for inference.
- class vipr.plugins.inference.steps.load_model_step.LoadModelInferenceStep(app)¶
Bases:
AbstractInferenceStep[Any]Step 2: Load Model — loads the inference model via a configured handler.
run(**config_overrides) -> Any
**config_overrides → merged into YAML config via _merge_config
- Hooks: Filters:
PRE_PRE (app, params: dict) PRE dict -> dict POST_PRE (app, params: dict) POST Any -> Any PRE_POST (app, model: Any) POST_POST (app, model: Any)
Config: inference.load_model.handler / .parameters
vipr.plugins.inference.steps.postprocess_step module¶
PostprocessStep implementation for the workflow.
This file implements the PostprocessStep class, which is responsible for postprocessing the results from the reduction step.
- class vipr.plugins.inference.steps.postprocess_step.PostprocessInferenceStep(app)¶
Bases:
AbstractInferenceStep[Any]Step 5: Postprocess — transforms prediction results for final output.
run(prediction_data: dict[str, Any], **config_overrides) -> Any
**config_overrides → merged into YAML config via _merge_config Result stored in app.inference.result via _on_complete(). If no handler configured, returns data unchanged.
- Hooks: Filters:
PRE_PRE (app, data: dict) PRE dict -> dict POST_PRE (app, data: dict) POST Any -> Any PRE_POST (app, data: Any) POST_POST (app, result: Any)
Config: inference.postprocess.handler / .parameters (optional)
vipr.plugins.inference.steps.prediction_step module¶
PredictionStep implementation for the workflow.
This file implements the PredictionStep class, which is responsible for applying the model to preprocessed data.
- class vipr.plugins.inference.steps.prediction_step.PredictionInferenceStep(app)¶
Bases:
AbstractInferenceStep[dict[str,Any]]Step 4: Prediction — applies the loaded model to preprocessed data.
run(data: DataSet, **config_overrides) -> dict[str, Any]
**config_overrides → merged into YAML config via _merge_config Model accessed via self.app.inference.model (set in Step 2). PRE_FILTER filters config_overrides, NOT the DataSet.
- Hooks: Filters:
PRE_PRE (app, data: DataSet, params: dict) PRE dict -> dict POST_PRE (app, data: DataSet, params: dict) POST dict -> dict PRE_POST (app, data: dict) <- prediction result, not DataSet! POST_POST (app, result: dict)
Config: inference.prediction.handler / .parameters
vipr.plugins.inference.steps.preprocess_step module¶
PreprocessStep implementation for the workflow.
This file implements the PreprocessStep class, which is responsible for preprocessing normalized data before applying the model.
- class vipr.plugins.inference.steps.preprocess_step.PreprocessInferenceStep(app)¶
Bases:
AbstractInferenceStep[DataSet]Step 3: Preprocess — transforms data via registered filter chain.
run(data: DataSet, **config_overrides) -> DataSet
**config_overrides → merged into YAML config via _merge_config
- Hooks: Filters:
PRE_PRE (app, data: DataSet, params: dict) PRE DataSet -> DataSet (data transform!) POST_PRE (app, data: DataSet, params: dict) POST DataSet -> DataSet PRE_POST (app, data: DataSet) POST_POST (app, data: DataSet)
Note: Unlike other steps, PRE_FILTER transforms data (DataSet -> DataSet), not config. Filter params come from YAML via _wrap_with_params. Config overrides flow only to execute() via _merge_config.
Config: inference.preprocess.handler / .parameters (optional)
- execute(data: DataSet, params: dict[str, Any] | None = None) DataSet¶
Performs the preprocessing of the data.
Currently a passthrough — all transformation happens in PRE_FILTER. Can be extended with handler-based preprocessing via YAML config.
- Parameters:
data – DataSet to preprocess
params – Config overrides (merged into YAML config via _merge_config)
- Returns:
Preprocessed data
- Return type: