Skip to content

Commit e743d2c

Browse files
committed
feat(gui): preload default seed
1 parent a7c1f75 commit e743d2c

File tree

3 files changed

+12
-134
lines changed

3 files changed

+12
-134
lines changed

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,13 @@ Launch the evolution controller (create a fresh experiment)
2929
python scripts/run_example.py --experiment my_exp
3030
```
3131

32-
Monitor the evolution process in real‑time using the optional Streamlit dashboard:
32+
Monitor the evolution process in real‑time using the Streamlit GUI:
3333

34-
```bash
35-
$ streamlit run scripts/dashboard.py
36-
```
37-
38-
The dashboard uses Streamlit to visualize the evolution process and back‑test results.
39-
40-
Alternatively you can launch and monitor an experiment entirely from the dashboard itself:
4134
```bash
4235
$ streamlit run scripts/gui.py
4336
```
44-
The sidebar lets you paste a seed strategy in a large text area, tune the options from
37+
38+
The GUI lets you paste a seed strategy in a large text area, tune the options from
4539
`examples/config.py` and pick the number of iterations. Click **Run evolution** to start
4640
the search and watch the hall‑of‑fame table update live.
4741

@@ -53,7 +47,7 @@ Use the `--experiment` option to keep runs separate:
5347
python scripts/run_example.py --experiment my_exp
5448
```
5549

56-
This creates a new SQLite file `my_exp.db` under `~/.alphaevolve/`. The dashboard lists all experiments, allowing you to switch between them or delete one via the **Delete experiment** sidebar button.
50+
This creates a new SQLite file `my_exp.db` under `~/.alphaevolve/`. The GUI lists all experiments, allowing you to switch between them or delete one via the **Delete experiment** sidebar button.
5751

5852
---
5953

scripts/dashboard.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

scripts/gui.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
from alphaevolve.store.sqlite import ProgramStore
2323
from examples import config as example_config
2424

25+
# Default code shown in the sidebar seed text area
26+
DEFAULT_SEED_CODE = (
27+
Path(__file__).resolve().parent.parent / "examples" / "sma_momentum.py"
28+
).read_text()
29+
2530
st.set_page_config(page_title="AlphaEvolve", layout="wide")
2631

2732
st.title("🧬 AlphaEvolve GUI")
@@ -31,7 +36,9 @@
3136
# --------------------------------------------------------------------
3237
exp_name = st.sidebar.text_input("Experiment", value="my_exp")
3338
iterations = st.sidebar.number_input("Iterations", 1, 1000, 10, step=1)
34-
seed_code = st.sidebar.text_area("Seed strategy code", height=300)
39+
seed_code = st.sidebar.text_area(
40+
"Seed strategy code", value=DEFAULT_SEED_CODE, height=300
41+
)
3542
TOP_K = st.sidebar.slider("Top K strategies", 3, 50, 10)
3643

3744
# Tune example configuration values

0 commit comments

Comments
 (0)