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

POST_FILTER: str | None = 'INFERENCE_LOAD_DATA_POST_FILTER'
POST_POST_FILTER_HOOK: str | None = 'INFERENCE_LOAD_DATA_POST_POST_FILTER_HOOK'
POST_PRE_FILTER_HOOK: str | None = 'INFERENCE_LOAD_DATA_POST_PRE_FILTER_HOOK'
PRE_FILTER: str | None = 'INFERENCE_LOAD_DATA_PRE_FILTER'
PRE_POST_FILTER_HOOK: str | None = 'INFERENCE_LOAD_DATA_PRE_POST_FILTER_HOOK'
PRE_PRE_FILTER_HOOK: str | None = 'INFERENCE_LOAD_DATA_PRE_PRE_FILTER_HOOK'
execute(params: dict[str, Any]) DataSet

Performs the data loading and creates DataSet.

Parameters:

params – Parameters that control the data loading process

Returns:

Loaded data with errors and metadata

Return type:

DataSet

run(**config_overrides) DataSet

Executes the entire data loading step.

Parameters:

**config_overrides – Override YAML config values (merged via _merge_config)

Returns:

Loaded data with errors and metadata

Return type:

DataSet

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

POST_FILTER: str | None = 'INFERENCE_LOAD_MODEL_POST_FILTER'
POST_POST_FILTER_HOOK: str | None = 'INFERENCE_LOAD_MODEL_POST_POST_FILTER_HOOK'
POST_PRE_FILTER_HOOK: str | None = 'INFERENCE_LOAD_MODEL_POST_PRE_FILTER_HOOK'
PRE_FILTER: str | None = 'INFERENCE_LOAD_MODEL_PRE_FILTER'
PRE_POST_FILTER_HOOK: str | None = 'INFERENCE_LOAD_MODEL_PRE_POST_FILTER_HOOK'
PRE_PRE_FILTER_HOOK: str | None = 'INFERENCE_LOAD_MODEL_PRE_PRE_FILTER_HOOK'
execute(params: dict[str, Any]) Any

Performs the model loading.

Parameters:

params – Parameters that control the model loading process

Returns:

The loaded model

Return type:

Any

run(**config_overrides) Any

Executes the entire model loading step.

Parameters:

**config_overrides – Override YAML config values (merged via _merge_config)

Returns:

The loaded model

Return type:

Any

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)

POST_FILTER: str | None = 'INFERENCE_POSTPROCESS_POST_FILTER'
POST_POST_FILTER_HOOK: str | None = 'INFERENCE_POSTPROCESS_POST_POST_FILTER_HOOK'
POST_PRE_FILTER_HOOK: str | None = 'INFERENCE_POSTPROCESS_POST_PRE_FILTER_HOOK'
PRE_FILTER: str | None = 'INFERENCE_POSTPROCESS_PRE_FILTER'
PRE_POST_FILTER_HOOK: str | None = 'INFERENCE_POSTPROCESS_PRE_POST_FILTER_HOOK'
PRE_PRE_FILTER_HOOK: str | None = 'INFERENCE_POSTPROCESS_PRE_PRE_FILTER_HOOK'
execute(data: dict[str, Any], params: dict[str, Any] | None = None) Any

Performs the postprocessing of the reduction results.

Parameters:
  • data – Reduction results to postprocess

  • params – Config overrides (merged into YAML config via _merge_config)

Returns:

Postprocessed results

Return type:

Any

run(prediction_data: dict[str, Any], **config_overrides) Any

Executes the entire postprocessing step.

Parameters:
  • prediction_data – Prediction results data to postprocess

  • **config_overrides – Override YAML config values (merged via _merge_config)

Returns:

Final processed results

Return type:

Any

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

POST_FILTER: str | None = 'INFERENCE_PREDICTION_POST_FILTER'
POST_POST_FILTER_HOOK: str | None = 'INFERENCE_PREDICTION_POST_POST_FILTER_HOOK'
POST_PRE_FILTER_HOOK: str | None = 'INFERENCE_PREDICTION_POST_PRE_FILTER_HOOK'
PRE_FILTER: str | None = 'INFERENCE_PREDICTION_PRE_FILTER'
PRE_POST_FILTER_HOOK: str | None = 'INFERENCE_PREDICTION_PRE_POST_FILTER_HOOK'
PRE_PRE_FILTER_HOOK: str | None = 'INFERENCE_PREDICTION_PRE_PRE_FILTER_HOOK'
execute(data: DataSet, params: dict[str, Any]) dict[str, Any]

Performs the model prediction on preprocessed data.

Parameters:
  • data – Preprocessed DataSet to use for prediction

  • params – Additional parameters that control the prediction process

Returns:

Prediction results

Return type:

dict[str, Any]

run(data: DataSet, **config_overrides) dict[str, Any]

Executes the entire prediction step.

Parameters:
  • data – Preprocessed DataSet to use for prediction

  • **config_overrides – Override YAML config values (merged via _merge_config)

Returns:

Prediction results

Return type:

dict[str, Any]

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)

POST_FILTER: str | None = 'INFERENCE_PREPROCESS_POST_FILTER'
POST_POST_FILTER_HOOK: str | None = 'INFERENCE_PREPROCESS_POST_POST_FILTER_HOOK'
POST_PRE_FILTER_HOOK: str | None = 'INFERENCE_PREPROCESS_POST_PRE_FILTER_HOOK'
PRE_FILTER: str | None = 'INFERENCE_PREPROCESS_PRE_FILTER'
PRE_POST_FILTER_HOOK: str | None = 'INFERENCE_PREPROCESS_PRE_POST_FILTER_HOOK'
PRE_PRE_FILTER_HOOK: str | None = 'INFERENCE_PREPROCESS_PRE_PRE_FILTER_HOOK'
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:

DataSet

run(data: DataSet, **config_overrides) DataSet

Executes the entire preprocessing step.

Parameters:
  • data – DataSet to preprocess

  • **config_overrides – Override YAML config values (merged via _merge_config)

Returns:

Preprocessed data

Return type:

DataSet

Module contents