51 lines
1.2 KiB
PowerShell
51 lines
1.2 KiB
PowerShell
param(
|
|
[string]$PythonExe = "",
|
|
[string]$BackendUrl = "http://127.0.0.1:8787/api/assistant/message",
|
|
[string]$LlmProvider = "local",
|
|
[string]$LlmModel = "qwen2.5-14b-instruct-1m",
|
|
[string]$LlmBaseUrl = "http://127.0.0.1:1234",
|
|
[ValidateSet("semantic", "route", "factual")]
|
|
[string]$StrictPolicy = "route",
|
|
[switch]$DryRun
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$RepoRoot = Split-Path -Parent $ScriptDir
|
|
|
|
if (-not $PythonExe) {
|
|
$PythonExe = "python"
|
|
}
|
|
|
|
$NightlyScript = Join-Path $ScriptDir "run_address_nightly_regression.py"
|
|
if (-not (Test-Path $NightlyScript)) {
|
|
throw "Nightly script not found: $NightlyScript"
|
|
}
|
|
|
|
$argsList = @(
|
|
$NightlyScript,
|
|
"--backend-url", $BackendUrl,
|
|
"--llm-provider", $LlmProvider,
|
|
"--llm-model", $LlmModel,
|
|
"--llm-base-url", $LlmBaseUrl,
|
|
"--strict-policy", $StrictPolicy
|
|
)
|
|
|
|
if ($DryRun) {
|
|
$argsList += "--dry-run"
|
|
}
|
|
|
|
Write-Host "Running ADDRESS nightly regression from $RepoRoot"
|
|
Write-Host "$PythonExe $($argsList -join ' ')"
|
|
|
|
Push-Location $RepoRoot
|
|
try {
|
|
& $PythonExe @argsList
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "Nightly regression failed with exit code $LASTEXITCODE"
|
|
}
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
}
|