Skip to content

Commit 55348de

Browse files
committed
Independent visualization script for the evolution tree from a checkpoint
1 parent 4b099e3 commit 55348de

File tree

6 files changed

+380
-2
lines changed

6 files changed

+380
-2
lines changed

.github/workflows/python-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jobs:
1313
- uses: psf/black@stable
1414
with:
1515
options: "--check --verbose"
16-
src: "./openevolve ./tests ./examples"
16+
src: "./openevolve ./tests ./examples ./scripts"
1717
use_pyproject: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ install: venv
3333
# Run Black code formatting
3434
.PHONY: lint
3535
lint: venv
36-
$(PYTHON) -m black openevolve examples tests
36+
$(PYTHON) -m black openevolve examples tests scripts
3737

3838
# Run tests using the virtual environment
3939
.PHONY: test

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,20 @@ diff -u checkpoints/checkpoint_10/best_program.py checkpoints/checkpoint_20/best
128128
# Compare metrics
129129
cat checkpoints/checkpoint_*/best_program_info.json | grep -A 10 metrics
130130
```
131+
132+
### Visualizing the evolution tree
133+
134+
The script in `scripts/visualize.py` allows you to visualize the evolution tree and display it in your webbrowser. The script watches live for the newest checkpoint directory in the examples/ folder structure and updates the graph. Alternatively, you can also provide a specific checkpoint folder with the `--path` parameter.
135+
136+
```bash
137+
# Install requirements
138+
pip install -r scripts/requirements.txt
139+
140+
# Start the visualization web server
141+
python scripts/visualizer.py
142+
```
143+
![OpenEvolve Visualizer](openevolve-visualizer.png)
144+
131145
### Docker
132146

133147
You can also install and execute via Docker:

openevolve-visualizer.png

103 KB
Loading

scripts/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask

0 commit comments

Comments
 (0)