-
Notifications
You must be signed in to change notification settings - Fork 1
AutoDiscovery Changes Since NeurIPS
This page lightly describes what's changed to the core AutoDiscovery unit since the NeurIPS repo (specifically its src/), which now lives down in packages/autodiscovery/src/autodiscovery.
Snapshot as of 2026-07-01. This is a point-in-time comparison and is not kept up to date — more may have changed since this was written. Diff the two paths directly for the current state.
Same discovery algorithm and Bayesian-surprise core you already know from the NeurIPS repo — now it speaks Gemini/Vertex, retries robustly, tracks token cost everywhere, expands nodes in parallel across sandboxed execution backends, and ships an easy CLI + HTML report. The only result-affecting logic changes are in dedup (stricter), beliefs (retry fix, fewer samples), and a couple of MCTS defaults/metrics.
The NeurIPS repo is the research reference implementation. The version in asta-autodiscovery is the same MCTS-based Bayesian-surprise discovery engine, but hardened and generalized into a production package inside the larger Asta app suite. The core science (Bayesian surprise math, MCTS structure) is essentially unchanged — the churn is almost entirely productionization: multi-provider LLM support, parallelism, cost tracking, execution sandboxes, and reporting.
Every file carries cosmetic churn you can tune out: Black reformatting, from src.* → from autodiscovery.*, Optional[X]/List[X] → X | None/list[X], docstring reflow. The package is now a uv workspace member, invoked as python -m autodiscovery.run instead of the old autodiscovery console script, and version comes from package metadata (the hardcoded __version__ was dropped).
This is the biggest theme. The default models flipped from OpenAI (o4-mini/gpt-4o) to Gemini (gemini-3.1-pro-preview / gemini-3-flash-preview).
-
agents.pynow branches onis_gemini_model()and routes Gemini through Vertex AI's OpenAI-compatible endpoint, using a Vertex access token as the API key. -
New files
vertex_client.py/vertex_config.py: build the Vertex base URL from project/location env vars and provide an OpenAI-client wrapper that refreshes Google ADC credentials before each call. -
utils.pyquery path now fans Gemini calls out across a thread pool and applies reasoning-effort to Gemini too.
-
New
llm_retry.py:tenacity-based backoff wrapping all LLM calls, with broad retryable-error classification across Google, OpenAI,requests,urllib3, honoringRetry-After. Provider-levelmax_retriesset to 0 so this is the single retry path. Also handles Vertex token refresh mid-run. -
New
llm_usage.py: aUsageTrackerthreaded through everything (rewards, beliefs, dedup, agent chats, image analysis) that attributes token usage/cost by model/agent/node/component, withreasoning_tokens, and persistsllm_usage_events.jsonl+llm_usage_summary.json. New--agent_usage_modearg (per_responsevssummary_delta) controls how AG2 usage is captured.
-
run.pyrewrote the core loop from "expand one node per iteration" to a batched, multi-threaded expansion driven by an experiment budget (--batch_size,--n_threads, viaThreadPoolExecutor), with per-node locks, per-thread agents/work-dirs, and per-node failure isolation (a failed node is logged and skipped instead of aborting the run — supported by the new tinyfuture_utils.py). -
agents.pyadded a--backendarg (local/process/modal;processis now the default). NewModalSandboxExecutorruns code in an ephemeral Modal/asta-sandbox with a GCS bucket mounted read-only at/data(--bucket_path). Datasets are now symlinked into the work dir instead of copied. -
Vision model is configurable (
--vision_model) instead of hardcodedgpt-4o.
These change results, not just plumbing:
-
beliefs.py: the Bayesian math is byte-identical after reformatting, BUT abreak-on-success was added to the belief retry loop — previously a good result could be overwritten by continued retries (correctness + cost fix). Also--n_belief_samplesdefault dropped 30 → 5, and belief calls got a separate--belief_reasoning_effort. -
deduplication.py: dedup now keys off the raw hypothesis string instead of the structured decomposition, and the LLM merge prompt was rewritten to be stricter/more conservative (different clause ⇒ not a duplicate) → expect fewer merges. Output contract changed:dedupe()returns(deduped, duplicates)and writesduplicate_nodes.json. Nodes now use real IDs. -
run.py:k_parentsdefault 3 → 10; added a newnormalized_surprisalmetric per node (with aboolean_cattheoretical-max calc).MCTSNodegainedcreated_atandnormalized_surprisalfields. -
dataset.py: newastametadata format is now the default (wasdbench); dataset paths are now metadata-relative rather than basename.
-
New
easy.py: a simplified flat CLI (auto-discovery) — point it at raw CSV/TSV files, it auto-sniffs headers, generates the metadata JSON, runs, and produces a report. No hand-written metadata file needed. -
New
report.py(~850 lines): generates a self-contained static HTML report (report/index.html+data.js+figures/) with a D3 tree viz and markdown rendering. This replaces the oldmcts_viz.html(the only file deleted).
| Added in asta | Purpose |
|---|---|
llm_retry.py |
centralized backoff + Vertex token refresh |
llm_usage.py |
token/cost accounting |
vertex_client.py / vertex_config.py
|
Vertex/Gemini plumbing |
easy.py |
simplified "point at CSVs" CLI |
report.py |
HTML report generator |
future_utils.py |
concurrent-future helper for parallel expansion |
Removed: mcts_viz.html (superseded by report.py).
Essentially unchanged (cosmetic only): structured_outputs.py, transitions.py, nodes_to_csv.py, log_utils.py. logger.py lost its logprob/choice-logging (the old autogen.ChatCompletion dependency was dropped).