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.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
fix(tests): wire the suites and recognizers the merged branch left behind
Nandakishora6af7f383999
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex c97db629..c97f733d 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -150,6 +150,7 @@ jobs:python tests/test_temperature_loading.pypython tests/test_confidence.pypython tests/test_cli.py+ python tests/test_cli_lang_guess.pypython tests/test_mcp.pypython tests/test_mcp_device.pypython tests/test_langchain.pydiff --git a/tests/test_agent_gate.py b/tests/test_agent_gate.pyindex fbe256aa..33f862fe 100644--- a/tests/test_agent_gate.py+++ b/tests/test_agent_gate.py@@ -20,6 +20,10 @@ if "torch" not in sys.modules:t = types.ModuleType("torch")t.cuda = types.ModuleType("torch.cuda")t.cuda.OutOfMemoryError = type("OutOfMemoryError", (RuntimeError,), {})+ # laya/common.py annotates `proper_reward` with both at module scope, so importing+ # laya.agent through this stub needs them present even though no test touches a tensor.+ t.Tensor = type("Tensor", (), {})+ t.dtype = type("dtype", (), {})t.nn = types.ModuleType("torch.nn")t.nn.Module = type("Module", (), {})t.nn.MultiheadAttention = type("MultiheadAttention", (), {})diff --git a/tests/test_cli.py b/tests/test_cli.pyindex efcaed5c..ae15a909 100644--- a/tests/test_cli.py+++ b/tests/test_cli.py@@ -697,12 +697,12 @@ code, out, err, stub = run_cli(["--predict", "--model", "english", "--task", "mucheck("drift: every control the parser names a flag for arrives in the call",all(control in stub.kwargs for control in (PREDICT_CONTROLS & NAMED)),"missing %s" % sorted((PREDICT_CONTROLS & NAMED) - set(stub.kwargs)))-# `lang_guess` is the weaker form of a flag the CLI already has, and both are call-level, so-# `--lang` dominates it for a command line; `hooks_raise` / `hooks_timeout` govern hooks, and-# `make_router` installs none, so there is nothing in this process for them to change.-check("drift: the controls with no flag are exactly the accepted six",+# `lang_guess` has had its own flag since #795, so what is left is the hook arguments:+# `hooks_raise` / `hooks_timeout` govern hooks and `make_router` installs none, so there is+# nothing in this process for them to change, and the three callables cannot come off a shell.+check("drift: the controls with no flag are exactly the accepted five",sorted(PREDICT_CONTROLS - NAMED)- == ["hooks", "hooks_raise", "hooks_timeout", "lang_guess",+ == ["hooks", "hooks_raise", "hooks_timeout","on_predict_end", "on_predict_start"],sorted(PREDICT_CONTROLS - NAMED))diff --git a/tests/test_compose_env.py b/tests/test_compose_env.pyindex 5f1e27a8..a3152016 100644--- a/tests/test_compose_env.py+++ b/tests/test_compose_env.py@@ -94,7 +94,8 @@ EMPTY_OR = 'os.environ.get("{name}") or '# A resolver that returns its own default from the empty string: the read, then a falsy test on# the next line, then the value it hands back. Only the first two lines are looked at, so a# reader that ignores an empty value and keeps going is still reported.-EMPTY_RESOLVER = (r'os\.environ\.get\("{name}"(,\s*""\s*)?\)\s*\n\s*if not \w+\b')+EMPTY_RESOLVER = (r'os\.environ\.get\("{name}"(,\s*""\s*)?\)\s*\n'+ r'\s*if (not \w+|\w+ is None or not \w+)\b')def empty_unsafe_reads(name: str) -> List[str]: