chore: 移除临时校验脚本
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$base = "http://8.161.227.145:20000/" + [uri]::EscapeDataString('测试开发工程师') + "/testdev-learning-path/"
|
||||
$checks = @(
|
||||
@('', @('s5-4','modules/s5-05-data-llm/index.html','已上线 5 / 5','65 章 / 300 个小节')),
|
||||
@('modules/s5-05-data-llm/index.html', @('模块 5 / 5','数据与大模型测试','13 章','60 个小节','数据与大模型测试')),
|
||||
@('modules/s5-05-data-llm/01-why.html', @('judge_agreement 0.9150','85.1','data-portal-back="testdev/testdev-learning-path"','assets/back.js')),
|
||||
@('modules/s5-05-data-llm/02-data-quality.html', @('id="sec-2-1"','create_time')),
|
||||
@('modules/s5-05-data-llm/03-pipeline.html', @('85,410','84,126','id="sec-3-1"')),
|
||||
@('modules/s5-05-data-llm/04-metrics.html', @('ok: 86 metrics','create_time')),
|
||||
@('modules/s5-05-data-llm/05-consistency.html', @('2.3 行明细','2024-12-06')),
|
||||
@('modules/s5-05-data-llm/06-eval-set.html', @('spread=1.6pp','84.2%')),
|
||||
@('modules/s5-05-data-llm/07-rag.html', @('2024-11-30','11-30')),
|
||||
@('modules/s5-05-data-llm/08-hallucination.html',@('agree_rate 0.9150','103 / 售后政策 47')),
|
||||
@('modules/s5-05-data-llm/09-injection.html', @('越权调用 3 次','uniq -c')),
|
||||
@('modules/s5-05-data-llm/10-regression.html', @('max_drop_pt: 3','watch_only','target_max')),
|
||||
@('modules/s5-05-data-llm/11-lab.html', @('p95_first_token 2.3s / cost 0.009cny','max_drop_pt','两个视角要和 37 条对上')),
|
||||
@('modules/s5-05-data-llm/12-cheat.html', @('p95_first_token_s: 2.5','极差 1.2 个点')),
|
||||
@('modules/s5-05-data-llm/13-checklist.html', @('batch=20241227','91.0% → 78.0%','reviewed_by'))
|
||||
)
|
||||
$fail = 0
|
||||
foreach ($c in $checks) {
|
||||
$url = $base + $c[0]
|
||||
try {
|
||||
$r = Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 30
|
||||
$code = $r.StatusCode
|
||||
$txt = $r.Content
|
||||
} catch {
|
||||
$code = 'ERR'; $txt = ''
|
||||
Write-Host ("FAIL HTTP {0} {1}" -f $c[0], $_.Exception.Message) -ForegroundColor Red
|
||||
$fail++
|
||||
}
|
||||
$miss = @()
|
||||
foreach ($needle in $c[1]) { if ($txt -notlike "*$needle*") { $miss += $needle } }
|
||||
if ($miss.Count -gt 0) { $fail++; Write-Host ("FAIL MISS {0} [{1}]" -f $c[0], ($miss -join ' | ')) -ForegroundColor Red }
|
||||
else { Write-Host ("ok {0} {1} ({2} bytes)" -f $code, $(if ($c[0] -eq '') { '(root)' } else { $c[0] }), $txt.Length) }
|
||||
}
|
||||
# 404
|
||||
try {
|
||||
$r = Invoke-WebRequest -Uri ($base + 'nope-404.html') -UseBasicParsing -TimeoutSec 30
|
||||
Write-Host ("FAIL 404 expected, got {0}" -f $r.StatusCode) -ForegroundColor Red; $fail++
|
||||
} catch {
|
||||
$sc = $_.Exception.Response.StatusCode.value__
|
||||
Write-Host ("ok 404 -> {0}" -f $sc)
|
||||
}
|
||||
# 门户根
|
||||
try {
|
||||
$r = Invoke-WebRequest -Uri 'http://8.161.227.145:20000/' -UseBasicParsing -TimeoutSec 30
|
||||
if ($r.Content -like '*测试开发工程师*') { Write-Host "ok portal root" } else { Write-Host "FAIL portal root" -ForegroundColor Red; $fail++ }
|
||||
} catch { Write-Host "FAIL portal root: $($_.Exception.Message)" -ForegroundColor Red; $fail++ }
|
||||
Write-Host ("`n== 失败项:{0}" -f $fail)
|
||||
Reference in New Issue
Block a user