Skip to content

[Agent] Task" object has no field "is_success" when resetting task #670

@huhao0926

Description

@huhao0926

Initial Checks

  • I have searched GitHub for a duplicate issue and I'm sure this is something new
  • I have read and followed the docs & demos and still think this is a bug
  • I am confident that the issue is with ms-agent (not my code, or another library in the ecosystem)

What happened + What you expected to happen

When running the data science assistant functionality, the error occurs
2025-07-15 18:41:21.871 - modelscope-agent - ERROR - | message: error: "Task" object has no field "is_success"
Traceback (most recent call last):
File "/Users/hao0926.hu/repair/ms-agent/ds_test.py", line 14, in
responses = ds_assistant.run(question)
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/agent.py", line 22, in wrapper
response = func(self, *args, **kwargs)
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/agent.py", line 116, in run
result = self._run(*args, **kwargs)
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/agents/data_science_assistant.py", line 801, in _run
raise e
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/agents/data_science_assistant.py", line 766, in _run
self.plan.replace_task(task, decomposed_tasks)
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/schemas.py", line 216, in replace_task
self.reset_task(t.task_id)
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/schemas.py", line 165, in reset_task
task.reset()
File "/Users/hao0926.hu/repair/ms-agent/modelscope_agent/schemas.py", line 67, in reset
self.is_success = False
File "/Users/hao0926.hu/miniconda3/envs/py310/lib/python3.10/site-packages/pydantic/main.py", line 997, in setattr
elif (setattr_handler := self._setattr_handler(name, value)) is not None:
File "/Users/hao0926.hu/miniconda3/envs/py310/lib/python3.10/site-packages/pydantic/main.py", line 1044, in _setattr_handler
raise ValueError(f'"{cls.name}" object has no field "{name}"')
ValueError: "Task" object has no field "is_success"

Versions / Dependencies

release/0.8

Reproduction script

rom modelscope_agent.agents.data_science_assistant import DataScienceAssistant
from modelscope_agent.tools.metagpt_tools.tool_recommend import TypeMatchToolRecommender

llm_config = {
'model': 'Qwen/Qwen3-8B',
'model_server': 'openai',
'api_base': 'https://api.siliconflow.cn/v1',
'api_key': '硅基流动api_key'
}
tool_recommender = TypeMatchToolRecommender(tools=[""])
ds_assistant = DataScienceAssistant(llm=llm_config, tool_recommender=tool_recommender)
question = "This is a medical dataset with over fifty anonymized health characteristics linked to three age-related conditions. Your goal is to predict whether a subject has or has not been diagnosed with one of these conditions. The target column is Class. Perform data analysis, data preprocessing, feature engineering, and modeling to predict the target. Report F1 Score on the eval data. Train data path: ‘/Users/hao0926.hu/pyproject/data_interpreter/di_dataset/ml_benchmark/04_titanic/split_train.csv', eval data path: ‘/Users/hao0926.hu/pyproject/data_interpreter/di_dataset/ml_benchmark/04_titanic/split_eval.csv' . It is only necessary to provide the relevant code, without actually running it to verify whether it can run successfully"
responses = ds_assistant.run(question)
for res in responses:
print(res)

Issue Severity

None

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions