wren runs its model on one BLAS thread

threadpoolctl scopes the limit to wren.act, so other numpy calls in the
engine keep their threads.
This commit is contained in:
2026-10-15 09:55:02 +02:00
parent f2a823218a
commit 5e5f1836cb
4 changed files with 48 additions and 1 deletions
+9
View File
@@ -58,6 +58,10 @@ dependencies = [
# The `mlp` node, which is registered at boot. Kept out of the extras
# because a data-science environment has it already.
"numpy>=2.2.6",
# The `wren` node runs its model on one BLAS thread, which answers in about
# half the time. Scoped to the call: OPENBLAS_NUM_THREADS would bind every
# other numpy call in the engine too, and only counts before numpy loads.
"threadpoolctl>=3.5",
# The `inject` node's cron. Imported where it is used, behind a message
# that cannot fire while this line is here.
"croniter>=1.3.0",
@@ -164,6 +168,11 @@ ignore_missing_imports = true
module = ["wren"]
ignore_missing_imports = true
# What scopes the `wren` node's BLAS threads to its call; it ships no types.
[[tool.mypy.overrides]]
module = ["threadpoolctl"]
ignore_missing_imports = true
[tool.ruff]
target-version = "py312"