Skip to content

feat(examples): run upstream AlphaEvolve entrypoints locally - #540

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
Yushu-Li:feat/alphaevolve-local-entrypoints
Oct 23, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
Yushu-Li:feat/alphaevolve-local-entrypoints

Conversation

@Yushu-Li

Copy link
Copy Markdown
Contributor

Run the original circle-packing and TSP src/run_evolution.py entrypoints through the local AlphaEvolve facade. The new opt-in walkthrough CLI stages byte-identical copies of src/ and instructions.md, loads relative helpers, and swaps only imported client/experiment factories and configuration globals before calling the upstream main().

The endpoint/model are explicit. The default is seed-only; --evolve opts into one generation attempt, with an optional positive --iterations. Only a named --api-key-env supplies credentials; otherwise a local placeholder is used without ambient-key fallback. Source .env* and bytecode caches are not copied, dotenv.load_dotenv is disabled during import, and temporary configuration environment changes are restored. Selected OE connection/budget/output options take precedence over same-named upstream constructor options.

SDK aliases and temporary package registrations are removed before main() so evaluator callables serialize by value to workers. Reports run against staged sources, and the upstream checkout stays untouched. An explicit output directory must be new and outside the example; it preserves sources, OE output and upstream report artifacts, including partial output on failure. Otherwise the temporary run is cleaned up. A main that returns without a completed local experiment raises an error.

Validation:

  • 14 new offline tests cover both entrypoint shapes, relative helpers, actual OE seed/worker execution, source preservation, credential/budget selection, option precedence, layout drift, namespace/environment cleanup, and output-directory protection.
  • Full offline suite: 872 tests passed. Black/isort, Python 3.10 grammar checks and Frame scans of both new Python files passed.
  • Executed the real upstream circle-packing and TSP main() at revision 34cd919193945c6dc81053f9af594031b54f41a8, each seed-only and with one scripted proposal through the real OE controller/worker. Both original and staged source hashes stayed unchanged. Google SDK imports were blocked, temporary aliases were cleaned up, and guarded socket/HTTP/credential-lookup attempts were zero. No real model or managed-service requests were made.
  • The original TSP reporting flow produced all five PNG reports and its saved best program in both runs. Circle-packing's original visualization flow completed with the Agg backend. These checks used Matplotlib 3.10.9. The walkthrough documents matplotlib>=3.9.1,<3.11 for the upstream plot helper's legacy cm.get_cmap call, removed in Matplotlib 3.11; no plotting code is rewritten or patched.

Continues #468 without closing it. This example supports only circle packing and TSP; signal processing's cloud-specific query/controller calls remain a follow-up. The existing facade still exposes only its best result, so upstream history plots and list counts are not complete evaluation statistics. Budgets count OE generation attempts; seed scoring, retries and report-time scoring are additional. Trusted import/evaluation/report code runs with normal process privileges and no added sandbox. Use a fresh, single-threaded main process; dynamic relative imports after initial loading are outside this reviewed subset. No core OE contracts or base dependencies change.

@codelion
codelion merged commit 839dea9 into algorithmicsuperintelligence:main Oct 23, 2026
4 checks passed
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.

2 participants