Run the environment from scratch until it is done.
(self)
| 70 | return cls(environment=environment, task=task) |
| 71 | |
| 72 | def run(self): |
| 73 | """Run the environment from scratch until it is done.""" |
| 74 | self.environment.reset() |
| 75 | self.logs = [] |
| 76 | total_decision_making_process = [] |
| 77 | advice = "No advice yet." |
| 78 | previous_plan = "No solution yet." |
| 79 | while not self.environment.is_done(): |
| 80 | result, advice, previous_plan, logs, success, decision_making_process = asyncio.run( |
| 81 | self.environment.step(advice, previous_plan) |
| 82 | ) |
| 83 | self.logs += logs |
| 84 | total_decision_making_process += decision_making_process |
| 85 | self.environment.report_metrics() |
| 86 | self.save_result(previous_plan, result, self.environment.get_spend()) |
| 87 | return previous_plan, result, self.logs, total_decision_making_process |
| 88 | |
| 89 | def singleagent_thinking(self, preliminary_solution, advice) -> str: |
| 90 | preliminary_solution = self.environment.solve( |
nothing calls this directly
no test coverage detected