Download src/__init__.py from SyedaArisha/predictive-maintenance-rag-system: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/SyedaArisha/predictive-maintenance-rag-system/resolve/main/src/__init__.py
- Command line
-
hf download hf://SyedaArisha/predictive-maintenance-rag-system/src/__init__.py
-
curl -L -o __init__.py https://huggingface.co/SyedaArisha/predictive-maintenance-rag-system/resolve/main/src/__init__.py
1.97 kB
| """ | |
| 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' | |
| ] | |