From cbe8c0f03e70f77ab655f82f57fdfc20297902fc Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Tue, 5 May 2026 14:05:45 -0700 Subject: [PATCH] feat(benchmark): wire EmbeddingKNNAdapter into MODEL_REGISTRY; add embed_model config - Add embed_model: nomic-embed-text to config/label_tool.yaml (local, gitignored) - Add # embed_model: commented example to config/label_tool.yaml.example - Add pyyaml>=6.0 to requirements.txt (explicit dep for _resolve_urls yaml.safe_load) - Add params assertion to test_embed_knn_nomic_registry_entry --- config/label_tool.yaml.example | 1 + requirements.txt | 1 + tests/test_benchmark_classifier.py | 1 + 3 files changed, 3 insertions(+) diff --git a/config/label_tool.yaml.example b/config/label_tool.yaml.example index 3542e9d..16ee12c 100644 --- a/config/label_tool.yaml.example +++ b/config/label_tool.yaml.example @@ -46,6 +46,7 @@ cforch: # license_key: CFG-AVCT-xxxx-xxxx-xxxx # ollama_url: http://localhost:11434 # ollama_model: llama3.2:3b + # embed_model: nomic-embed-text # Ollama embedding model for EmbeddingKNNAdapter # judge_url: http://10.1.10.158:8008 # Sif cf-text — LLM-as-judge secondary scorer # judge_url: http://10.1.10.71:8008 # Heimdall cf-text (alternative) # Or set CF_JUDGE_URL. Populates the Judge URL field in the LLM Eval UI automatically. diff --git a/requirements.txt b/requirements.txt index b1b82c2..6b48bad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ pydantic>=2.0.0 uvicorn[standard]>=0.20.0 httpx>=0.24.0 pytest>=7.0.0 +pyyaml>=6.0 diff --git a/tests/test_benchmark_classifier.py b/tests/test_benchmark_classifier.py index f5dcfb0..1d7cddc 100644 --- a/tests/test_benchmark_classifier.py +++ b/tests/test_benchmark_classifier.py @@ -250,5 +250,6 @@ def test_embed_knn_nomic_registry_entry(): entry = MODEL_REGISTRY["embed-knn-nomic"] assert entry["adapter"] is EmbeddingKNNAdapter assert entry["model_id"] == "nomic-embed-text" + assert entry["params"] == "local-embed" assert entry["default"] is False assert entry.get("kwargs", {}).get("k") == 3