satorbis_kit.inference.base_inference module

class satorbis_kit.inference.base_inference.BaseInference(config: Dict[str, Any])[source]

Bases: ABC

Base class for inference modules. Provides a standardized template for model inference pipelines, ensuring consistent error handling, and configuration management across different model implementations.

abstractmethod load_model()[source]

Load the model into memory.

abstractmethod postprocess(data: Any) Any[source]

Transform model output into the desired format.

abstractmethod predict(data: Any) Any[source]

Execute the model prediction.

abstractmethod preprocess(data: Any) Any[source]

Prepare the data for model prediction.

abstractmethod validate_input(data: Any) Any[source]

Validate the input data format and constraints.

abstractmethod validate_output(data: Any) Any[source]

Validate the final output before returning.