MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / update_model

Function update_model

uncommon_route/router/classifier.py:97–103  ·  view source on GitHub ↗

Apply one online Perceptron update. Returns True if model exists.

(features: dict[str, float], correct_tier: str)

Source from the content-addressed store, hash-verified

95
96
97def update_model(features: dict[str, float], correct_tier: str) -> bool:
98 """Apply one online Perceptron update. Returns True if model exists."""
99 _ensure_model_loaded()
100 if _model is None:
101 return False
102 _model.update(features, correct_tier)
103 return True
104
105
106def save_online_model(path: Path | None = None) -> None:

Calls 2

_ensure_model_loadedFunction · 0.85
updateMethod · 0.45