[2026-06-02] 학습 파이프라인 진단 로그 보강
This commit is contained in:
@@ -41,22 +41,33 @@ function Invoke-PythonStep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Log "training pipeline started"
|
try {
|
||||||
|
Write-Log "training pipeline started"
|
||||||
|
Write-Log "python resolved: $Python"
|
||||||
|
|
||||||
$HolidayCheck = & $Python scripts\_is_trading_day.py 2>&1
|
$HolidayCheck = & $Python scripts\_is_trading_day.py 2>&1
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Write-Log "market closed - skipped ($HolidayCheck)"
|
Write-Log "market closed - skipped ($HolidayCheck)"
|
||||||
exit 0
|
exit 0
|
||||||
|
}
|
||||||
|
Write-Log "trading day check passed ($HolidayCheck)"
|
||||||
|
|
||||||
|
Invoke-PythonStep -Name "collecting daily market features" -StepArgs @("scripts\collect_daily_features.py") -Required $false
|
||||||
|
|
||||||
|
Invoke-PythonStep -Name "collecting KIS minute data" -StepArgs @("scripts\collect_minute_data.py", "--top", "30", "--real-quotes") -Required $false
|
||||||
|
|
||||||
|
Invoke-PythonStep -Name "exporting bot training dataset" -StepArgs @("scripts\export_training_dataset.py", "data\training_dataset.csv") -Required $true
|
||||||
|
|
||||||
|
Invoke-PythonStep -Name "building external training dataset" -StepArgs @("scripts\build_external_training_dataset.py", "--out", "data\external_training_dataset.csv", "--all-minutes") -Required $true
|
||||||
|
|
||||||
|
Invoke-PythonStep -Name "training model" -StepArgs @("scripts\train_ai_model.py") -Required $true
|
||||||
|
|
||||||
|
Write-Log "training pipeline finished"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Log "training pipeline failed: $($_.Exception.Message)"
|
||||||
|
if ($_.ScriptStackTrace) {
|
||||||
|
Add-Content -Path $LogPath -Value $_.ScriptStackTrace -Encoding UTF8
|
||||||
|
}
|
||||||
|
throw
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-PythonStep -Name "collecting daily market features" -StepArgs @("scripts\collect_daily_features.py") -Required $false
|
|
||||||
|
|
||||||
Invoke-PythonStep -Name "collecting KIS minute data" -StepArgs @("scripts\collect_minute_data.py", "--top", "30", "--real-quotes") -Required $false
|
|
||||||
|
|
||||||
Invoke-PythonStep -Name "exporting bot training dataset" -StepArgs @("scripts\export_training_dataset.py", "data\training_dataset.csv") -Required $true
|
|
||||||
|
|
||||||
Invoke-PythonStep -Name "building external training dataset" -StepArgs @("scripts\build_external_training_dataset.py", "--out", "data\external_training_dataset.csv", "--all-minutes") -Required $true
|
|
||||||
|
|
||||||
Invoke-PythonStep -Name "training model" -StepArgs @("scripts\train_ai_model.py") -Required $true
|
|
||||||
|
|
||||||
Write-Log "training pipeline finished"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user