From 4760dfd13b84db970a32647f0d2e774999ba3c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=A3=92=E6=A3=92?= Date: Tue, 28 Nov 2023 14:50:59 +0800 Subject: [PATCH] fix: module not found. --- metagpt/roles/ml_engineer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metagpt/roles/ml_engineer.py b/metagpt/roles/ml_engineer.py index 56fbd2525..3f46b9451 100644 --- a/metagpt/roles/ml_engineer.py +++ b/metagpt/roles/ml_engineer.py @@ -84,7 +84,7 @@ class MLEngineer(Role): # ask for acceptance, users can other refuse and change tasks in the plan task_result_confirmed = await self._ask_review() - if success and task_result_confirmed and not code.startswith("!pip"): + if success and task_result_confirmed: # tick off this task and record progress task.code = code task.result = result @@ -126,6 +126,8 @@ class MLEngineer(Role): # print(result) self.working_memory.add(Message(content=result, role="user", cause_by=ExecutePyCode)) + if code.startswith("!pip"): + success = False # if not success: # await self._ask_review()