Skip to content

fix: reconcile run_vector_search defaults with CLI defaults#4

Merged
rasros merged 1 commit into
mainfrom
fix/reconcile-runner-defaults
Jul 10, 2026
Merged

fix: reconcile run_vector_search defaults with CLI defaults#4
rasros merged 1 commit into
mainfrom
fix/reconcile-runner-defaults

Conversation

@rasros

@rasros rasros commented Jul 10, 2026

Copy link
Copy Markdown
Owner

What

The run_vector_search signature defaults had drifted from the canonical CLI defaults in cli.py. main.py passes every argument explicitly, so the CLI path was unaffected — but any library/test caller relying on the defaults got different (and in one case broken) behavior.

Drift fixed:

Parameter Old runner default CLI default
pool_size 20 100
epoch_diversity 0.10 0.0
vision_model "ensemble" google/siglip-so400m-patch14-384
llm_rate 0.2 derived min(2/workers, 0.2)

"ensemble" was especially wrong: get_scorer forwards vision_model straight to VisionScorer as an HF repo id, so the stale default would have failed to load a model.

How

Rather than duplicate literals, the runner now imports the defaults from cli.py (the single source of truth). The import is acyclic — cli.py depends only on score/search/argparse. llm_rate defaults to None and is derived from workers via the same _default_llm_rate helper the CLI uses.

Tests

Added test_runner_defaults_match_cli_defaults, which introspects the signature and asserts each default tracks its CLI counterpart, so this can't silently drift again. Full suite: 357 passed.

@rasros rasros merged commit d7e6f86 into main Jul 10, 2026
1 check passed
@rasros rasros deleted the fix/reconcile-runner-defaults branch July 10, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant