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.

build(dotnet): require Python 3.12 to record the confidence probe

kevin-gatimu783d69ca4932
diff --git a/laya-dotnet/tools/dump_routing_golden.py b/laya-dotnet/tools/dump_routing_golden.py
index d1340f57..9d559377 100644
--- a/laya-dotnet/tools/dump_routing_golden.py
+++ b/laya-dotnet/tools/dump_routing_golden.py
@@ -252,6 +252,10 @@ def _gate(answers, threshold):
def build_confidence_probe():
+ # jev_confidence sums floats; CPython 3.12 made sum() compensated, and the SDKs reproduce that.
+ if sys.version_info < (3, 12):
+ sys.exit("confidence_probe.json must be recorded with Python 3.12 or later "
+ "(sum() of floats is compensated from 3.12 on), got %d.%d" % sys.version_info[:2])
scalars = [dict(value=v, **_checked(confidence.check_min_confidence, v)) for v in cc.SCALAR_THRESHOLDS]
maps = []