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.

release: 0.4.6

Nandakishorc73908d96ff7
diff --git a/README.md b/README.md
index 4d2c2669..78720624 100644
--- a/README.md
+++ b/README.md
@@ -94,27 +94,25 @@ The shipped checkpoints work zero-shot, but fine-tuning on decisions from your o
**[nandhakishorm.github.io/laya](https://nandhakishorm.github.io/laya/)**: guides for [prediction hooks](https://nandhakishorm.github.io/laya/hooks/), [schema-driven decisions](https://nandhakishorm.github.io/laya/structured/), [Docker](https://nandhakishorm.github.io/laya/docker/) and [LangChain and LangGraph](https://nandhakishorm.github.io/laya/langchain/), plus a full [API reference](https://nandhakishorm.github.io/laya/reference/).
-## What's new in 0.4.5
+## What's new in 0.4.6
+* **`laya.load(..., backend="onnx")` is annotated as what it returns.** It builds an `ONNXAgent`,
+ which shares the hook machinery with `Agent` but is not a subclass of it, so a caller who trusted
+ the `-> Agent` annotation and reached for the PyTorch-side controls got an `AttributeError` the
+ type checker called impossible (#1166).
+* **`Router.route_batch` rejects a `None` state before loading a checkpoint**, naming the request
+ index instead of failing later inside `Agent.predict_batch` (#1165).
+
+Carried over from 0.4.5, an hour earlier, because they are the ones to read before upgrading:
+
+* **laya-ts routes unidentified text to multilingual**, matching Python since 0.4.0. This changes
+ the default: pass `new Router({ default: "english" })` for the old fallback (#1157). It also
+ clears a stale `low_confidence` marker on a reused result, gating on the same number Python does
+ (#1153, #910).
* **A ragged calibration pool keeps its fit.** `fit_one_temperature` squared off rows of different
option counts with a pad value that then competed in the same softmax, so a question type pooled
across option-count bands could report the neutral `1.0`, or the ceiling, for a fit that ran.
- Rows are now grouped by option count and the search on log T is bounded. Single-width fits are
- unchanged to twelve decimal places (#1158).
-* **laya-ts routes unidentified text to multilingual**, matching Python since 0.4.0. This changes
- the default: pass `new Router({ default: "english" })` for the old fallback (#1157).
-* **laya-ts clears a stale `low_confidence` marker** when a reused result is re-evaluated at a more
- permissive threshold, `0.0` included, gating on the same number Python does (#1153, #910).
-* **Windows CI runs the shared suite list.** Its inline copy had drifted to 55 of the 87 suites and
- accepted missing suite files silently (#1156).
-* **`cached_embed_fn` says what it caches.** A transient `NaN` row is repaired to zeros and the
- repaired row is cached, so that option ranks as a zero vector until `cache_clear()`, while the
- unwrapped embedder recovers on its own (#1161).
-* **Docs**: three snippets that could not run as written now can (a missing `sys`, a missing
- `hashlib, json`, a configuration row whose example raised the row below it), the option ceiling
- is published with the instruction it was measured with, and the `run_id` count, the empty-batch
- `ctx.usage`, the `revisions` block per route and the whole-model quantization failure are each
- stated as measured (#1151, #1154, #1155, #1159, #1162, #1163, #1150, #1160, #1164).
+ Single-width fits are unchanged to twelve decimal places (#1158).
Earlier releases are in the [GitHub releases](https://github.com/NandhaKishorM/laya/releases).
diff --git a/laya/__init__.py b/laya/__init__.py
index 63e198d1..90abf17f 100644
--- a/laya/__init__.py
+++ b/laya/__init__.py
@@ -35,7 +35,7 @@ from .presets import (
from .router import DEFAULT_MODELS, RouteDecision, Router
from .structured import DecisionResult, decide, decide_batch
-__version__ = "0.4.5"
+__version__ = "0.4.6"
# Routing, language detection and email cleaning are pure Python. The torch-backed names are
# resolved lazily so that `import laya` -- and therefore `from laya import Router` or
diff --git a/nix/package.nix b/nix/package.nix
index 7eb574eb..3beb60fa 100644
--- a/nix/package.nix
+++ b/nix/package.nix
@@ -12,7 +12,7 @@ let
# side, where tests/test_packaging.py compares all three declarations (this one,
# pyproject.toml and laya.__version__) and fails CI when they diverge. Nothing
# did, which is how this sat at 0.3.4 while the package reached 0.3.20.
- version = "0.4.5";
+ version = "0.4.6";
src = ../.;
format = "setuptools";
propagatedBuildInputs = with python3Packages; [
diff --git a/pyproject.toml b/pyproject.toml
index b85c1830..9df173f6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "laya"
-version = "0.4.5"
+version = "0.4.6"
description = "Fast, non-autoregressive System 1 decision engine with calibrated probabilities"
readme = "README.md"
requires-python = ">=3.10"