-
Notifications
You must be signed in to change notification settings - Fork 0
perf: parallelize benchmark candidate search #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
69abad8
5a9077c
32e97a9
92d5988
67529d2
93131c1
4877bee
6be00ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,7 +95,7 @@ vp run bench:retrieval:full | |
|
|
||
| `bench:retrieval` aliases `bench:retrieval:validate`. Every profile measures the same physical | ||
| rankings and retrieval variants; profiles only control matrix size, holdout coverage, and expensive | ||
| diagnostics. The selected profile is recorded in schema-22 artifacts without changing retrieval | ||
| diagnostics. The selected profile is recorded in schema-24 artifacts without changing retrieval | ||
| semantics. The full profile includes all three fusion methods; short profiles intentionally omit RRF | ||
| to keep development runs fast. | ||
|
|
||
|
|
@@ -110,6 +110,7 @@ Limit an exploratory run with comma-separated environment variables: | |
| $env:PIX_BENCH_REPOS = "fd" | ||
| $env:PIX_BENCH_MODELS = "Xenova/all-MiniLM-L6-v2" | ||
| $env:PIX_BENCH_OPTIMIZATION_PROFILE = "search-priority" | ||
| $env:PIX_BENCH_ROUTER_STRATEGY = "proxy-promotion" | ||
| vp run bench:retrieval:validate | ||
| ``` | ||
|
|
||
|
|
@@ -154,6 +155,12 @@ defaulting to MiniLM. Select another with `PIX_BENCH_MODELS`. Supported values a | |
| - `Xenova/bge-small-en-v1.5` | ||
| - `jinaai/jina-embeddings-v2-base-code` | ||
|
|
||
| The router search defaults to `proxy-promotion`. Set `PIX_BENCH_ROUTER_STRATEGY` to | ||
| `successive-halving` to select the historical Successive-Halving variant. It uses the original | ||
| lexicographic `R@20`, `R@10`, `Context@4k`, and MRR comparator plus its `halvingKeepFactor`. | ||
| Both strategies use the same candidate evaluator and native worker queue, so their artifacts can be | ||
| compared directly. | ||
|
|
||
|
Comment on lines
+158
to
+163
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Document both candidate-evaluation modes. The README describes native worker execution as unconditional. The queue factory selects
📍 Affects 1 file
🤖 Prompt for AI Agents |
||
| The Jina code model cannot embed Effect's longest 7,103-token AST chunk on the tested DML GPU even as | ||
| a single-item batch. Do not silently truncate, re-chunk only one model, or mix CPU and GPU vectors to | ||
| complete that cell: any of those choices changes the comparison. Treat the cell as unsupported until | ||
|
|
@@ -310,9 +317,13 @@ Score and DBSF consume the same `ChannelRankings` interface and are evaluated wi | |
| encoders, persistence, or scoring. `src/lib/retrieval/evidence-router.ts` is likewise shared by production | ||
| configuration and benchmark evidence evaluation. | ||
|
|
||
| `benchmarks/retrieval/optimization-profiles.ts` owns authored (`authored-seed`) profile seeds, and | ||
| `benchmarks/retrieval/weight-search.ts` owns candidate search. A validated benchmark result is promoted | ||
| to an explicit production configuration; production does not discover or optimize its own profile. | ||
| `benchmarks/retrieval/evaluation/optimization-profiles.ts` owns authored (`authored-seed`) profile seeds, and | ||
| `benchmarks/retrieval/evaluation/weight-search.ts` owns candidate search. Corpus checkout and preparation | ||
| live under `benchmarks/retrieval/corpus/`; native SQLite and worker execution live under | ||
| `benchmarks/retrieval/execution/`. A validated benchmark result is promoted to an explicit production | ||
| configuration; production does not discover or optimize its own profile. Router searches keep their beam | ||
| and archive state on the main thread; only candidate scoring crosses the worker seam, so independent jobs | ||
| share one queue without a second controller-worker protocol. | ||
|
|
||
| The remaining architectural follow-up is a diagnostic retrieval snapshot from `IndexStore` if future | ||
| benchmark work needs to inspect persisted channel evidence through the application boundary. Current | ||
|
|
@@ -339,7 +350,9 @@ output size without introducing an LLM or provider-specific tokenizer. | |
|
|
||
| Each run writes ignored JSON and Markdown artifacts under `benchmarks/results`. JSON rows retain the | ||
| repository, revision, language, size, category, difficulty, query form, grouped fold, model, variant, | ||
| individual gold ranks, timing, and every metric. Schema 22 stores each authored query and its exact | ||
| individual gold ranks, timing, and every metric. Schema 24 adds selectable router strategies while | ||
| retaining shared candidate-queue lifecycle and | ||
| per-router candidate-pool initialization timings. Each artifact stores each authored query and its exact | ||
| file-qualified ground truth once, records productive Sparse timings, and adds | ||
| the fixed equal-weight RRF baseline. The Markdown report includes quality by query form, | ||
| marginal leave-one-channel-out contribution, cross-validation folds, Shapley values, and final fitted | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the cache explanation for the runtime comparison.
Line 35 says that embedding was reused from a persistent cache.
benchmarks/README.mdLines 105-106 state that each model run computes Dense and Sparse vectors once and has no benchmark embedding cache. If the run reused retrieval or index artifacts, name those artifacts instead of saying that the embedding was reused.🤖 Prompt for AI Agents
Source: Path instructions