oncodsl / Read docs /PROMPT_enable_search.md
govindbalki's picture
Upload folder using huggingface_hub
0fff343 verified
|
Raw
History Blame Contribute Delete
2.52 kB
# Prompt β€” enable the Search operator (turn on the full DSL)
Search is currently gated off by default; turn it on so the engine can use the whole DSL. Verified the exact location. Airgap untouched (Search operates on opaque IDs). `pytest` + `tsc` after.
## 1. Enable Search injection (engine_v2/synthesize.py)
`DEFAULT_RATES` (~lines 51-55) has `"search": 0.0`. Set it to a **modest non-zero** rate so Search appears in the population without dominating or blowing up runtime:
- `"search": 0.05`
Keep Search's existing safety **caps** (k ≀ 4 selected, ≀ 200 candidate columns) β€” those bound each Search's cost; don't remove them. The injection gate at ~line 109 (`rates["search"] > 0`) already does the rest. Leave the other rates (split/fitapply/effect) unchanged.
## 2. Update the "Search" tile copy (web/app/Lab.tsx, DSL vocabulary)
The Search tile says "Nested feature search β€” available but off by default." Change it to reflect that it's now on, e.g. "Nested feature search β€” runs a small gene-ranking inside the program (bounded: ≀4 genes from ≀200 columns)." Remove the "off by default" wording.
## 3. (Recommended) a per-run toggle so it can be turned off for speed
Search is the one heavy operator β€” every Search node runs an inner gene-ranking, so runs will be slower. To keep control:
- `RunRequest` gains `enable_search: bool = True`. The `_worker` maps `enable_search=False` β†’ pass a rates override with `search: 0.0`; `True` β†’ use the default (0.05). (Thread the rates override into `run_v2_pipeline*` β†’ `synthesize`, which already accepts a `rates` dict, ~line 212/220.)
- Frontend: a Parameters checkbox **"Enable Search operator"** (default ON). Tooltip: "Lets programs run a small built-in gene-search (bounded). Powerful but the heaviest operator β€” turn off for faster runs."
- If this part is too much scope, at minimum do Parts 1-2 (enable by default); the toggle is the nice-to-have.
## CONSTRAINTS
- Airgap untouched β€” Search ranks opaque columns, no gene names.
- Caps stay (k ≀ 4, ≀ 200 cols) so cost is bounded.
- Note for the user: expect somewhat slower runs now that Search can fire; lower its rate or use the toggle if it's too slow.
## Checkpoint
- `DEFAULT_RATES["search"] = 0.05`; an HPV coherence run now shows Search used > 0Γ— in the DSL-vocabulary operator-usage panel.
- The Search tile no longer says "off by default".
- (If done) an "Enable Search operator" toggle (default ON) flips its rate.
- `pytest` green; airgap untouched; `tsc` clean.