MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/openevolve / __init__

Method __init__

examples/lm_eval/lm-eval.py:29–49  ·  view source on GitHub ↗
(
        self,
        init_file: str = "initial_content_stub.txt",
        evaluator_file: str = "evaluator_stub.py",
        config_file: str = "config.yml",
        iterations: int = 5,
        extra_param: List[str] = [],
        **kwargs,
    )

Source from the content-addressed store, hash-verified

27@register_model("openevolve")
28class OpenEvolve(LM):
29 def __init__(
30 self,
31 init_file: str = "initial_content_stub.txt",
32 evaluator_file: str = "evaluator_stub.py",
33 config_file: str = "config.yml",
34 iterations: int = 5,
35 extra_param: List[str] = [],
36 **kwargs,
37 ):
38 super().__init__()
39 self.init_file = init_file
40 self.evaluator_file = evaluator_file
41 self.iterations = iterations
42 self.extra_param = extra_param
43 self.config_file = config_file
44
45 # folder must match prompt:template_dir in config.yml!
46 self.prompt_path = "examples/lm_eval/prompts/system_message.txt"
47 self.evaluator_prompt_path = "examples/lm_eval/prompts/evaluator_system_message.txt"
48 self.best_path = "examples/lm_eval/openevolve_output/best/best_program.txt"
49 self.base_system_message = "You are an expert task solver, with a lot of commonsense, math, language and coding knowledge.\n\nConsider this task:\n```{prompt}´´´"
50
51 def generate(self, prompts: List[str], max_gen_toks: int = None, stop=None, **kwargs):
52 outs = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected