Skip to content

Commit 4b575f5

Browse files
authored
Merge pull request #6 from paperswithbacktest/codex/remove-evaluation_file-and-update-initial_program_path
Remove evaluation_file param
2 parents c7f48a4 + c17efe1 commit 4b575f5

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ from alphaevolve import AlphaEvolve
4343

4444
# Initialize the system
4545
evolve = AlphaEvolve(
46-
initial_program_path="example/sma_momentum.py",
47-
evaluation_file="path/to/evaluator.py",
46+
initial_program_paths=["example/sma_momentum.py"],
4847
config_path="example/config.py"
4948
)
5049

alphaevolve/engine/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from pathlib import Path
88
from typing import Any, Dict, Optional
99

10-
from alphaevolve.store.sqlite import ProgramStore
1110
from alphaevolve.evolution.controller import Controller
11+
from alphaevolve.store.sqlite import ProgramStore
1212

1313
__all__ = ["AlphaEvolve", "Strategy"]
1414

@@ -19,23 +19,21 @@ class Strategy:
1919

2020
id: str
2121
code: str
22-
metrics: Dict[str, Any]
22+
metrics: dict[str, Any]
2323

2424

2525
class AlphaEvolve:
2626
"""Convenience wrapper for running the evolution loop."""
2727

2828
def __init__(
2929
self,
30-
initial_program_path: str,
31-
evaluation_file: str,
30+
initial_program_paths: list[str],
3231
config_path: str,
3332
*,
34-
store: Optional[ProgramStore] = None,
33+
store: ProgramStore | None = None,
3534
) -> None:
3635
# For now we simply ignore the paths but keep them for future use.
37-
self.initial_program_path = Path(initial_program_path)
38-
self.evaluation_file = Path(evaluation_file)
36+
self.initial_program_paths = [Path(p) for p in initial_program_paths]
3937
self.config_path = Path(config_path)
4038
self.store = store or ProgramStore()
4139
self.controller = Controller(self.store)

0 commit comments

Comments
 (0)