-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_training.ps1
More file actions
34 lines (28 loc) · 1.71 KB
/
Copy pathrun_training.ps1
File metadata and controls
34 lines (28 loc) · 1.71 KB
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
# EdgeSense AI Training Pipeline Script
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host "Starting EdgeSense AI Training Pipeline" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
# Step 1
Write-Host "`n[1/5] Installing Dependencies..." -ForegroundColor Yellow
pip install -r train/requirements_train.txt
if ($LASTEXITCODE -ne 0) { Write-Host "Failed to install dependencies!" -ForegroundColor Red; exit }
# Step 2
Write-Host "`n[2/5] Preparing Data (CWRU Downloads & Synthetics)..." -ForegroundColor Yellow
python train/01_prepare_data.py
if ($LASTEXITCODE -ne 0) { Write-Host "Failed to prepare data!" -ForegroundColor Red; exit }
# Step 3
Write-Host "`n[3/5] Training CNN Audio Model (This may take 15-40 min)..." -ForegroundColor Yellow
python train/02_train_cnn.py
if ($LASTEXITCODE -ne 0) { Write-Host "Failed to train CNN!" -ForegroundColor Red; exit }
# Step 4
Write-Host "`n[4/5] Training LSTM & Isolation Forest Vibration Models..." -ForegroundColor Yellow
python train/03_train_lstm.py
if ($LASTEXITCODE -ne 0) { Write-Host "Failed to train LSTM!" -ForegroundColor Red; exit }
# Step 5
Write-Host "`n[5/5] Verifying ONNX Models..." -ForegroundColor Yellow
python train/04_verify_models.py
if ($LASTEXITCODE -ne 0) { Write-Host "Model verification failed!" -ForegroundColor Red; exit }
Write-Host "`n==========================================" -ForegroundColor Green
Write-Host "SUCCESS: All AI models have been trained and exported!" -ForegroundColor Green
Write-Host "You can now run 'docker-compose up --build' to use real ONNX inference." -ForegroundColor Green
Write-Host "==========================================" -ForegroundColor Green