| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| $ErrorActionPreference = "Stop" |
| $root = Split-Path -Parent $PSScriptRoot |
| Set-Location $root |
|
|
| |
| $envFile = Join-Path $root ".env" |
| if (Test-Path $envFile) { |
| Get-Content $envFile | ForEach-Object { |
| if ($_ -match "^\s*([^#=\s][^=]*)=(.*)$") { |
| [System.Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process") |
| } |
| } |
| } |
|
|
| Write-Host "[run_all] Regenerating figures from cached intermediates ..." -ForegroundColor Cyan |
|
|
| |
| Write-Host "[run_all] 1/3 training metrics ..." |
| python scripts\plot_training_metrics.py |
| if ($LASTEXITCODE -ne 0) { Write-Error "plot_training_metrics failed"; exit 1 } |
|
|
| |
| Write-Host "[run_all] 2/3 head correspondence ..." |
| python -m sae_gemma.head_correspondence --plot-only |
| if ($LASTEXITCODE -ne 0) { Write-Error "head_correspondence failed"; exit 1 } |
|
|
| |
| Write-Host "[run_all] 3/3 ablation curve ..." |
| python -m sae_gemma.ablations --plot-only |
| if ($LASTEXITCODE -ne 0) { Write-Error "ablations failed"; exit 1 } |
|
|
| Write-Host "" |
| Write-Host "[run_all] Done. Figures written to results\figures\" -ForegroundColor Green |
| Write-Host " - results\figures\sae_training_metrics.png" |
| Write-Host " - results\figures\head_correspondence.png" |
| Write-Host " - results\figures\ablation_curve.png" |
|
|