🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
update: use WriteCodeByGenerate conditions.
刘棒棒7806013dcebf
diff --git a/metagpt/roles/ml_engineer.py b/metagpt/roles/ml_engineer.pyindex db2dfeeff..c2df4bb79 100644--- a/metagpt/roles/ml_engineer.py+++ b/metagpt/roles/ml_engineer.py@@ -149,7 +149,8 @@ class MLEngineer(Role):)logger.info(f"new code \n{code}")cause_by = DebugCode- elif not self.use_tools or self.plan.current_task.task_type == 'other':+ elif (not self.use_tools and not self.use_udfs) or (+ self.plan.current_task.task_type == 'other' and not self.use_udfs):logger.info("Write code with pure generation")# TODO: æ·»åŠ åŸºäºŽcurrent_task.instruction-code_pathçš„k-v缓å˜code = await WriteCodeByGenerate().run(@@ -326,12 +327,12 @@ if __name__ == "__main__":role.use_udfs = Falseawait role.run(requirement)# use udfs- # role.reset()- # role.make_udfs = False- # role.use_udfs = True- # role.use_code_steps = False- # role.use_tools = False- # await role.run(requirement)+ role.reset()+ role.make_udfs = False+ role.use_udfs = True+ role.use_code_steps = False+ role.use_tools = False+ await role.run(requirement)# requirement = "Perform data analysis on the provided data. Train a model to predict the target variable Survived. Include data preprocessing, feature engineering, and modeling in your pipeline. The metric is accuracy."