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.

docs(hooks): on_route, on_load and on_evict honour hooks_raise

Adeshina Lasisic7ce13d1f67a
diff --git a/docs/hooks/errors.md b/docs/hooks/errors.md
index dc1d52a7..7ec1e57a 100644
--- a/docs/hooks/errors.md
+++ b/docs/hooks/errors.md
@@ -63,9 +63,13 @@ Failure matrix, per event and runtime:
| `on_error` | Agent / Router | never masks the original exception; chained as `__context__`. |
| `on_predict_end` (success path) | Agent / Router | `hooks_raise=True`: propagates (the result is computed but the call fails). `False`: warn. |
| `on_predict_end` (failure path) | Agent / Router | never masks the original exception; chained as `__context__`. |
-| `on_route` | Router | propagates directly; there is no predict context yet. |
-| `on_load` | Router | propagates directly; the checkpoint stays built and resident. |
-| `on_evict` | Router | propagates directly; the checkpoint is already freed. |
+| `on_route` | Router | `hooks_raise=True`: propagates out of `route()`; raised inside `Router.predict` it also runs `on_error` and `on_predict_end`. `False`: warn and continue with the decision as it stands. |
+| `on_load` | Router | `hooks_raise=True`: propagates out of `load()`/`preload()`; the checkpoint stays built and resident. `False`: warn and continue. |
+| `on_evict` | Router | `hooks_raise=True`: propagates out of `load()`/`unload()`; the checkpoint is already freed. `False`: warn and continue. |
+
+Every row obeys the same `hooks_raise`: the routing and model-lifecycle events are dispatched
+with the Router's policy, so `hooks_raise=False` warns and continues for them exactly as it does
+for the predict events.
Consequences worth knowing: