File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ from alphaevolve import AlphaEvolve
43
43
44
44
# Initialize the system
45
45
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" ],
48
47
config_path = " example/config.py"
49
48
)
50
49
Original file line number Diff line number Diff line change 7
7
from pathlib import Path
8
8
from typing import Any , Dict , Optional
9
9
10
- from alphaevolve .store .sqlite import ProgramStore
11
10
from alphaevolve .evolution .controller import Controller
11
+ from alphaevolve .store .sqlite import ProgramStore
12
12
13
13
__all__ = ["AlphaEvolve" , "Strategy" ]
14
14
@@ -19,23 +19,21 @@ class Strategy:
19
19
20
20
id : str
21
21
code : str
22
- metrics : Dict [str , Any ]
22
+ metrics : dict [str , Any ]
23
23
24
24
25
25
class AlphaEvolve :
26
26
"""Convenience wrapper for running the evolution loop."""
27
27
28
28
def __init__ (
29
29
self ,
30
- initial_program_path : str ,
31
- evaluation_file : str ,
30
+ initial_program_paths : list [str ],
32
31
config_path : str ,
33
32
* ,
34
- store : Optional [ ProgramStore ] = None ,
33
+ store : ProgramStore | None = None ,
35
34
) -> None :
36
35
# 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 ]
39
37
self .config_path = Path (config_path )
40
38
self .store = store or ProgramStore ()
41
39
self .controller = Controller (self .store )
You can’t perform that action at this time.
0 commit comments