Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

fix(research): don't echo exception text in the capacity bench server's 400

Bhushan Kinge61f42e8e4d31
diff --git a/research/scripts/bench_nvidia_capacity.py b/research/scripts/bench_nvidia_capacity.py
index 9a23a82c..49ad402a 100644
--- a/research/scripts/bench_nvidia_capacity.py
+++ b/research/scripts/bench_nvidia_capacity.py
@@ -189,8 +189,8 @@ def serve(args):
await q.put(((body.get("state", ""), body["questions"]), fut))
try:
return web.json_response(await fut)
- except ValueError as e:
- raise web.HTTPBadRequest(text=str(e))
+ except ValueError: # a question the checkpoint cannot encode; the reason stays server-side
+ raise web.HTTPBadRequest(text="question cannot be encoded (options exceed head_max_len?)") from None
async def healthz(_):
return web.json_response({"ok": True})