Run a pass
Run col.tune() to produce a TuningPlan, and control whether the pass applies its result with the dry_run flag.
A tuning pass asks the collection's tuner to inspect the data and emit a TuningPlan. Run it with one call, col.tune(...); the dry_run flag decides whether the pass also applies what it found.
Before you start
The signed runtime is installed and verified (
telys runtime install, thentelys runtime verify).The collection has a concrete tuner attached. The base
TunerraisesNotImplementedError; useHeuristicTuner(bundled, runtime-only) orAlgentaTuner(from thetelys-algentaadapter).A partition is large enough to matter — past roughly 20,000 live rows. See Why tune.
The signature
col.tune(workload=None, objectives=None, dry_run=None) -> TuningPlanworkload
tuner-specific, or None
Representative queries the tuner fits to. HeuristicTuner ignores it; AlgentaTuner uses it.
objectives
tuner-specific, or None
The recall / latency / memory goals the tuner should optimize toward. Shape is defined by the tuner.
dry_run
bool or None
Whether the pass applies its plan. See the table below.
What dry_run does
dry_run
Behavior
True
Compute a plan and never apply it. Nothing on the collection changes.
False
Compute a plan and always apply it immediately.
None (default)
Compute a plan; apply it only if tuner.mode == "suggest_then_apply", otherwise suggest only.
col.tune(...) always returns the TuningPlan, regardless of dry_run. The flag governs only whether the plan's settings are written onto the collection during the call.
Run it
Expected result
col.tune(dry_run=True) returns a TuningPlan and changes nothing on disk or in the live collection. The printed fields look like:
Exact numbers depend on your data, tuner, and hardware, but you always get a populated TuningPlan: a plan_id, a target_recall, an exact_crossover_rows, an ivf layout, and an expected metrics dict. Because this was a dry run, col.stats() is unchanged until you apply the plan.
Next steps
Last updated
Was this helpful?