|
1 | 1 | from iohblade.experiment import MA_BBOB_Experiment |
2 | | -from iohblade.llm import Gemini_LLM, Ollama_LLM |
| 2 | +from iohblade.llm import Gemini_LLM, Ollama_LLM, Dummy_LLM |
3 | 3 | from iohblade.methods import LLaMEA, RandomSearch |
4 | 4 | from iohblade.loggers import ExperimentLogger |
5 | 5 | import numpy as np |
|
10 | 10 | ai_model = "gemini-2.0-flash" |
11 | 11 | llm1 = Gemini_LLM(api_key, ai_model) |
12 | 12 | llm2 = Ollama_LLM("codestral") |
13 | | - budget = 100 |
| 13 | + budget = 10 |
14 | 14 |
|
15 | 15 |
|
16 | 16 | mutation_prompts1 = [ |
|
34 | 34 |
|
35 | 35 | for llm in [llm1]:#, llm2]: |
36 | 36 | #RS = RandomSearch(llm, budget=budget) #LLaMEA(llm) |
37 | | - LLaMEA_method1 = LLaMEA(llm, budget=budget, name="LLaMEA-1", mutation_prompts=mutation_prompts1, n_parents=4, n_offspring=12, elitism=False) |
38 | | - LLaMEA_method2 = LLaMEA(llm, budget=budget, name="LLaMEA-2", mutation_prompts=mutation_prompts2, n_parents=4, n_offspring=12, elitism=False) |
39 | | - LLaMEA_method3 = LLaMEA(llm, budget=budget, name="LLaMEA-3", mutation_prompts=mutation_prompts3, n_parents=4, n_offspring=12, elitism=False) |
40 | | - LLaMEA_method4 = LLaMEA(llm, budget=budget, name="LLaMEA-4", mutation_prompts=mutation_prompts4, n_parents=4, n_offspring=12, elitism=False) |
41 | | - LLaMEA_method5 = LLaMEA(llm, budget=budget, name="LLaMEA-5", mutation_prompts=mutation_prompts5, n_parents=4, n_offspring=12, elitism=False) |
| 37 | + LLaMEA_method1 = LLaMEA(llm, budget=budget, name="LLaMEA-1", mutation_prompts=mutation_prompts1, n_parents=1, n_offspring=1, elitism=False) |
| 38 | + # LLaMEA_method2 = LLaMEA(llm, budget=budget, name="LLaMEA-2", mutation_prompts=mutation_prompts2, n_parents=4, n_offspring=12, elitism=False) |
| 39 | + # LLaMEA_method3 = LLaMEA(llm, budget=budget, name="LLaMEA-3", mutation_prompts=mutation_prompts3, n_parents=4, n_offspring=12, elitism=False) |
| 40 | + # LLaMEA_method4 = LLaMEA(llm, budget=budget, name="LLaMEA-4", mutation_prompts=mutation_prompts4, n_parents=4, n_offspring=12, elitism=False) |
| 41 | + # LLaMEA_method5 = LLaMEA(llm, budget=budget, name="LLaMEA-5", mutation_prompts=mutation_prompts5, n_parents=4, n_offspring=12, elitism=False) |
42 | 42 |
|
43 | 43 | methods = [LLaMEA_method1] #, LLaMEA_method4, LLaMEA_method5]#, LLaMEA_method4, LLaMEA_method5] |
44 | | - logger = ExperimentLogger("results/MA-BBOB") |
45 | | - experiment = MA_BBOB_Experiment(methods=methods, runs=2, seeds=[4,7], dims=[5], budget_factor=2000, budget=100, eval_timeout=60, show_stdout=True, exp_logger=logger) #normal run |
| 44 | + logger = ExperimentLogger("results/MA-BBOB-test") |
| 45 | + experiment = MA_BBOB_Experiment(methods=methods, runs=2, seeds=[4,7], dims=[5], budget_factor=200, budget=10, eval_timeout=60, show_stdout=True, exp_logger=logger) #normal run |
46 | 46 | experiment() #run the experiment |
47 | 47 |
|
48 | 48 |
|
|
0 commit comments