Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions e2e/e3-bench.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// E3: browser-tier benchmark through the LIVE /neural page (paper C).
import { chromium } from "@playwright/test"

const URL = "https://interscript.org/neural"
const MODEL = "tha-g2p-small-1.0" // smallest tier for a headless-runnable pass
const browser = await chromium.launch()
const page = await browser.newPage()

const t0 = Date.now()
await page.goto(URL, { waitUntil: "networkidle" })
console.log(`page load: ${Date.now() - t0} ms`)

await page.selectOption("#model", MODEL)
await page.evaluate(() => caches.keys().then((k) => Promise.all(k.map((n) => caches.delete(n)))))
for (const pass of ["cold", "warm"]) {
const t1 = Date.now()
await page.click("#run")
await page.waitForFunction(() => document.getElementById("output").textContent.length > 0, null, { timeout: 600000 })
const out = await page.textContent("#output")
console.log(`${pass} resolve+session+decode: ${Date.now() - t1} ms (out ${out.length}B)`)
if (pass === "cold") await page.click("#clear-cache")
}
await browser.close()
16 changes: 16 additions & 0 deletions e2e/e3-debug.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { chromium } from "@playwright/test"
const b = await chromium.launch()
const p = await b.newPage()
await p.goto("https://interscript.org/neural", { waitUntil: "networkidle" })
const res = await p.evaluate(async () => {
try {
const r = await fetch("https://github.com/interscript/interscript-ml/releases/download/index-v2/models-index.yaml.sha256")
return `ok ${r.status}`
} catch (e) { return `FAIL ${e.message} | ${e.cause?.message ?? ""}` }
})
console.log("index fetch:", res)
const same = await p.evaluate(async () => {
try { const r = await fetch("/v1/info"); return `ok ${r.status}` } catch (e) { return `FAIL ${e.message}` }
})
console.log("same-origin:", same)
await b.close()
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@iso24229/iso639-data": "^0.2.0",
"@tailwindcss/vite": "^4.0.0",
"astro": "^7.0.0",
"interscript": "^5.2.0",
"interscript": "^5.2.1",
"onnxruntime-web": "^1.29.0",
"tailwindcss": "^4.0.0",
"vue": "^3.5.0"
Expand Down
3 changes: 2 additions & 1 deletion src/pages/neural.astro
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ import Base from "../layouts/Base.astro"
conf.textContent = `Decode confidence: min top-2 gap ${min.toFixed(2)} across ${gaps.length} steps (lower = less certain)`
}
} catch (e) {
out.textContent = `Error: ${(e as Error).message}`
const cause = (e as Error).cause as Error | undefined
out.textContent = `Error: ${(e as Error).message}${cause ? " | cause: " + cause.message : ""}`
}
})

Expand Down