wren node: calibration setting, passed to wren's training as the installation's calibration records

This commit is contained in:
Melvin Strobl
2026-10-26 22:17:48 +01:00
parent ba75c78820
commit 7b453af3fe
3 changed files with 22 additions and 6 deletions
+8 -1
View File
@@ -269,6 +269,12 @@ class WrenNode(Node):
'as {"state": {"user_location": "kitchen"}, "command": "lights on", '
'"calls": [["kitchen_light", true]]}.',
)
calibration: list[dict[str, Any]] = Field(
default_factory=list,
description="Training only: commands in your own words, like "
"examples, that a new model's threshold is chosen on. It never "
"trains on them.",
)
tests: list[dict[str, Any]] = Field(
default_factory=list,
description="Training only: commands a new model is scored on, like "
@@ -355,10 +361,11 @@ class WrenNode(Node):
def installation(self) -> dict[str, Any]:
"""What wren's training flow learns from: the targets, each with a
value, and the ``examples`` and ``tests``."""
value, and the ``examples``, ``calibration`` and ``tests``."""
return {
"targets": [t | {"value": _unset(t)} for t in self.targets.values()],
"examples": self.cfg.examples,
"calibration": self.cfg.calibration,
"tests": self.cfg.tests,
}