pdmlabs.pipeline.mlflow_pipeline#

Classes

BasePdMPipeline(preprocessor, method, ...)

Base class for a Unified PdMLabs Pipeline.

RULPdMPipeline(preprocessor, method, ...)

Pipeline for Remaining Useful Life (RUL) Flavors.

SAPdMPipeline(preprocessor, method, ...)

Pipeline for Survival Analysis (SA) Flavors.

SemiSupervisedPdMPipeline(preprocessor, ...)

Pipeline for Semi-Supervised Flavors.

SupervisedPdMPipeline(preprocessor, method, ...)

Pipeline for Supervised Flavors.

UnsupervisedPdMPipeline(preprocessor, ...)

Pipeline for Unsupervised Flavors.

class pdmlabs.pipeline.mlflow_pipeline.BasePdMPipeline(preprocessor, method, postprocessor, thresholder)#

Bases: PythonModel

Base class for a Unified PdMLabs Pipeline. Encapsulates the preprocessor, method, postprocessor, and thresholder. Inherits from mlflow.pyfunc.PythonModel for seamless MLflow tracking and serving.

predict(context=None, model_input=None)#

MLflow compliant inference signature. model_input can be a dictionary containing target_data, source, and event_data, or a single DataFrame (which defaults to the first fitted source).

predict_scores_only(target_data, source, event_data)#

Executes preprocessor, method, and postprocessor but skips the thresholder.

set_global_threshold(th: float)#

Injects the globally optimal threshold found by the experiment’s evaluation metric.

class pdmlabs.pipeline.mlflow_pipeline.RULPdMPipeline(preprocessor, method, postprocessor, thresholder)#

Bases: SupervisedPdMPipeline

Pipeline for Remaining Useful Life (RUL) Flavors.

predict(context=None, model_input=None)#

Override to return RUL specific predictions bypassing binary thresholds.

class pdmlabs.pipeline.mlflow_pipeline.SAPdMPipeline(preprocessor, method, postprocessor, thresholder)#

Bases: SupervisedPdMPipeline

Pipeline for Survival Analysis (SA) Flavors.

fit_thresholder(result_scores, target_sources, event_data, result_labels)#

Allows the experiment to fit the SA thresholder on the validation set scores.

predict(context=None, model_input=None)#

Override to return SA specific predictions.

class pdmlabs.pipeline.mlflow_pipeline.SemiSupervisedPdMPipeline(preprocessor, method, postprocessor, thresholder)#

Bases: BasePdMPipeline

Pipeline for Semi-Supervised Flavors.

fit(historic_data, historic_sources, event_data)#
class pdmlabs.pipeline.mlflow_pipeline.SupervisedPdMPipeline(preprocessor, method, postprocessor, thresholder)#

Bases: BasePdMPipeline

Pipeline for Supervised Flavors.

fit(historic_data, historic_sources, event_data, anomaly_ranges)#
class pdmlabs.pipeline.mlflow_pipeline.UnsupervisedPdMPipeline(preprocessor, method, postprocessor, thresholder)#

Bases: BasePdMPipeline

Pipeline for Unsupervised Flavors.

fit()#