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(lint): import confidence helpers directly and remove unused symbols

Aashish76bfcf0d9b2c
diff --git a/laya/agent.py b/laya/agent.py
index ee0f19ca..48043a8e 100644
--- a/laya/agent.py
+++ b/laya/agent.py
@@ -21,15 +21,14 @@ from .common import (
clamp_temperature,
collate_items,
answer_confidence,
- check_min_confidence,
confidence_from_probs,
- flag_low_confidence,
_resolve_noul_labels,
encode_text,
render_options,
serialize_state,
temp_bucket,
)
+from .confidence import check_min_confidence, flag_low_confidence
from .hooks import (
HookRegistry, PredictContext, aggregate_usage, compose_hooks, dispatch, normalise_hooks,
validate_timeout,
diff --git a/laya/common.py b/laya/common.py
index 9855fcda..2cc7bbbd 100644
--- a/laya/common.py
+++ b/laya/common.py
@@ -388,8 +388,6 @@ def clamp_temperature(t, lo: float = TEMP_MIN, hi: float = TEMP_MAX) -> float:
return min(hi, max(lo, t))
-from .confidence import check_min_confidence, flag_low_confidence
-
def amp_dtype(name: Optional[str]) -> torch.dtype:
return torch.bfloat16 if name == "bf16" else torch.float16