SupportOps-Env / predictive_maintenance /Colab_Training_Script.py
Antigravity Agent
feat: deploy deepscan api backend (clean)
95e7952
Raw History Blame Contribute Delete
934 Bytes
import os
import sys
import subprocess
def run_pipeline():
print("Starting Predictive Maintenance Training Pipeline on Colab...")
scripts = [
"download_data.py",
"preprocess.py",
"train_anomaly_detector.py",
"train_rul_predictor.py",
"train_battery_soh.py"
]
base_dir = os.path.dirname(os.path.abspath(__file__))
for script in scripts:
script_path = os.path.join(base_dir, script)
print(f"\n{'='*50}\nRunning {script}...\n{'='*50}")
result = subprocess.run([sys.executable, script_path], cwd=base_dir)
if result.returncode != 0:
print(f"Error running {script}. Pipeline halted.")
sys.exit(1)
print("\n" + "="*50)
print("PIPELINE COMPLETE!")
print("All models saved to models/")
print("All plots saved to plots/")
print("="*50)
if __name__ == "__main__":
run_pipeline()