File size: 1,970 Bytes
baf834b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | """
Predictive Maintenance Master Source Package (src)
Organized into modular subpackages:
- src.preprocessing: Preprocessors for AI4I, Pump, CMAPSS, Azure PdM datasets
- src.training: Classification & RUL Regression model trainers
- src.rag: FAISS vector indexing and SmolLM2 explainer
- src.utils: Shared helpers, EDA visualization, and Production Scheduler
"""
import os
import sys
# Ensure all subdirectories of src are in sys.path for direct imports
src_dir = os.path.dirname(os.path.abspath(__file__))
for subfolder in ['preprocessing', 'training', 'rag', 'utils']:
sub_path = os.path.join(src_dir, subfolder)
if os.path.isdir(sub_path) and sub_path not in sys.path:
sys.path.insert(0, sub_path)
from preprocessing import (
preprocess_ai4i, preprocess_pump,
preprocess_cmapss, preprocess_azure
)
from training import (
train_pipeline, run_training_pipeline,
LSTMRegressor, CNNLSTMRegressor, CMAPSSDataset
)
from rag import (
build_and_save_index, LogRetriever,
generate_natural_language_logs, LLMExplainer, clean_report
)
from utils import (
set_seeds, time_tracker, logger,
plot_missing_values, plot_class_distributions,
plot_correlation_heatmap, plot_statistical_feature_importance,
plot_failure_distribution_timeline, plot_sensor_behavior_overlay,
ProductionScheduler, generate_mock_schedule
)
__all__ = [
'preprocess_ai4i', 'preprocess_pump', 'preprocess_cmapss', 'preprocess_azure',
'train_pipeline', 'run_training_pipeline', 'LSTMRegressor', 'CNNLSTMRegressor', 'CMAPSSDataset',
'build_and_save_index', 'LogRetriever', 'generate_natural_language_logs', 'LLMExplainer', 'clean_report',
'set_seeds', 'time_tracker', 'logger',
'plot_missing_values', 'plot_class_distributions',
'plot_correlation_heatmap', 'plot_statistical_feature_importance',
'plot_failure_distribution_timeline', 'plot_sensor_behavior_overlay',
'ProductionScheduler', 'generate_mock_schedule'
]
|