MCPcopy Create free account
hub / github.com/SamuelSchmidgall/AgentLaboratory / initial_solve

Method initial_solve

mlesolver.py:225–242  ·  view source on GitHub ↗

Initialize the solver and get an initial set of code and a return @return: None

(self)

Source from the content-addressed store, hash-verified

223 self.openai_api_key = openai_api_key
224
225 def initial_solve(self):
226 """
227 Initialize the solver and get an initial set of code and a return
228 @return: None
229 """
230 # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
231 # @@ Initial CodeGen Commands @@
232 # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
233 self.best_score = None
234 self.commands = [Replace()]
235 self.model = f"{self.llm_str}"
236 init_code, init_return, self.best_score = self.gen_initial_code()
237 self.best_codes = [(copy(init_code), self.best_score, init_return) for _ in range(1)]
238
239 self.code_lines = init_code
240 self.model = f"{self.llm_str}"
241 self.commands = [Edit(), Replace()]
242 self.prev_working_code = copy(self.code_lines)
243
244 @staticmethod
245 def clean_text(text):

Callers 1

running_experimentsMethod · 0.95

Calls 3

gen_initial_codeMethod · 0.95
ReplaceClass · 0.85
EditClass · 0.85

Tested by

no test coverage detected