rm code steps, mv planner, mv ci mle

This commit is contained in:
yzlin 2024-02-04 23:23:18 +08:00
parent 55dac10146
commit 4cfee3ba27
18 changed files with 44 additions and 82 deletions

File diff suppressed because one or more lines are too long

View file

@ -8,8 +8,8 @@ from metagpt.actions.ci.write_analysis_code import (
WriteCodeWithTools,
)
from metagpt.logs import logger
from metagpt.plan.planner import STRUCTURAL_CONTEXT
from metagpt.schema import Message, Plan, Task
from metagpt.strategy.planner import STRUCTURAL_CONTEXT
@pytest.mark.skip
@ -37,13 +37,12 @@ async def test_write_code_by_list_plan():
@pytest.mark.asyncio
async def test_tool_recommendation():
task = "clean and preprocess the data"
code_steps = ""
available_tools = {
"FillMissingValue": "Filling missing values",
"SplitBins": "Bin continuous data into intervals and return the bin identifier encoded as an integer value",
}
write_code = WriteCodeWithTools()
tools = await write_code._recommend_tool(task, code_steps, available_tools)
tools = await write_code._recommend_tool(task, available_tools)
assert len(tools) == 1
assert "FillMissingValue" in tools

View file

@ -1,7 +1,7 @@
import pytest
from metagpt.logs import logger
from metagpt.roles.code_interpreter import CodeInterpreter
from metagpt.roles.ci.code_interpreter import CodeInterpreter
@pytest.mark.asyncio

View file

@ -2,7 +2,7 @@ import pytest
from metagpt.actions.ci.execute_nb_code import ExecuteNbCode
from metagpt.logs import logger
from metagpt.roles.ml_engineer import MLEngineer
from metagpt.roles.ci.ml_engineer import MLEngineer
from metagpt.schema import Message, Plan, Task
from metagpt.tools.tool_types import ToolTypes
from tests.metagpt.actions.ci.test_debug_code import CODE, DebugContext, ErrorStr
@ -22,7 +22,6 @@ MockPlan = Plan(
dependent_task_ids=[],
instruction="Perform exploratory data analysis on the train dataset to understand the features and target variable.",
task_type="eda",
code_steps="",
code="",
result="",
is_success=False,
@ -35,7 +34,6 @@ MockPlan = Plan(
dependent_task_ids=[],
instruction="Perform exploratory data analysis on the train dataset to understand the features and target variable.",
task_type="eda",
code_steps="",
code="",
result="",
is_success=False,