From afb575cc91114dbe41d8f582294dcc3692990695 Mon Sep 17 00:00:00 2001 From: Xu Yang Date: Thu, 23 Oct 2025 16:00:23 +0800 Subject: [PATCH] fix: enhance feedback handling in MultiProcessEvolvingStrategy for improved task evolution (#1274) --- README.md | 33 ++++++++++--------- .../coder/CoSTEER/evolving_strategy.py | 16 +++++---- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a7e1411e..df72a820 100644 --- a/README.md +++ b/README.md @@ -413,16 +413,16 @@ More documents can be found in the **[📖 readthedocs](https://rdagent.readthed # 📃 Paper/Work list ## Overall Technical Report -- [R&D-Agent: Automating Data-Driven AI Solution Building Through LLM-Powered Automated Research, Development, and Evolution](https://arxiv.org/abs/2505.14738) +- [R&D-Agent: An LLM-Agent Framework Towards Autonomous Data Science](https://arxiv.org/abs/2505.14738) ```BibTeX -@misc{yang2024rdagent, - title={R\&D-Agent: Automating Data-Driven AI Solution Building Through LLM-Powered Automated Research, Development, and Evolution}, - author={Xu Yang and Xiao Yang and Shikai Fang and Bowen Xian and Yuante Li and Jian Wang and Minrui Xu and Haoran Pan and Xinpeng Hong and Weiqing Liu and Yelong Shen and Weizhu Chen and Jiang Bian}, - year={2025}, - eprint={2505.14738}, - archivePrefix={arXiv}, - primaryClass={cs.AI}, - url={https://arxiv.org/abs/2505.14738} +@misc{yang2025rdagentllmagentframeworkautonomous, + title={R&D-Agent: An LLM-Agent Framework Towards Autonomous Data Science}, + author={Xu Yang and Xiao Yang and Shikai Fang and Yifei Zhang and Jian Wang and Bowen Xian and Qizheng Li and Jingyuan Li and Minrui Xu and Yuante Li and Haoran Pan and Yuge Zhang and Weiqing Liu and Yelong Shen and Weizhu Chen and Jiang Bian}, + year={2025}, + eprint={2505.14738}, + archivePrefix={arXiv}, + primaryClass={cs.AI}, + url={https://arxiv.org/abs/2505.14738}, } ``` ![image](https://github.com/user-attachments/assets/28b0488d-a546-4fef-8dc5-563ed64a9b4d) @@ -468,13 +468,14 @@ For more detail, please refer to our **[🖥️ Live Demo page](https://rdagent. - [R&D-Agent-Quant: A Multi-Agent Framework for Data-Centric Factors and Model Joint Optimization](https://arxiv.org/abs/2505.15155) ```BibTeX -@misc{li2025rdagentquant, - title={R\&D-Agent-Quant: A Multi-Agent Framework for Data-Centric Factors and Model Joint Optimization}, - author={Yuante Li and Xu Yang and Xiao Yang and Minrui Xu and Xisen Wang and Weiqing Liu and Jiang Bian}, - year={2025}, - eprint={2505.15155}, - archivePrefix={arXiv}, - primaryClass={cs.AI} +@misc{li2025rdagentquantmultiagentframeworkdatacentric, + title={R&D-Agent-Quant: A Multi-Agent Framework for Data-Centric Factors and Model Joint Optimization}, + author={Yuante Li and Xu Yang and Xiao Yang and Minrui Xu and Xisen Wang and Weiqing Liu and Jiang Bian}, + year={2025}, + eprint={2505.15155}, + archivePrefix={arXiv}, + primaryClass={q-fin.CP}, + url={https://arxiv.org/abs/2505.15155}, } ``` ![image](https://github.com/user-attachments/assets/3186f67a-c2f8-4b6b-8bb9-a9b959c13866) diff --git a/rdagent/components/coder/CoSTEER/evolving_strategy.py b/rdagent/components/coder/CoSTEER/evolving_strategy.py index 720cf1a4..18d56d7b 100644 --- a/rdagent/components/coder/CoSTEER/evolving_strategy.py +++ b/rdagent/components/coder/CoSTEER/evolving_strategy.py @@ -81,6 +81,11 @@ class MultiProcessEvolvingStrategy(EvolvingStrategy): ) -> EvolvingItem: code_list = [None for _ in range(len(evo.sub_tasks))] + last_feedback = None + if len(evolving_trace) > 0: + last_feedback = evolving_trace[-1].feedback + assert isinstance(last_feedback, CoSTEERMultiFeedback) + # 1.找出需要evolve的task to_be_finished_task_index: list[int] = [] for index, target_task in enumerate(evo.sub_tasks): @@ -94,15 +99,14 @@ class MultiProcessEvolvingStrategy(EvolvingStrategy): elif ( target_task_desc not in queried_knowledge.success_task_to_knowledge_dict and target_task_desc not in queried_knowledge.failed_task_info_set - and not (self.improve_mode and last_feedback[index] is None) + and not ( + self.improve_mode + and isinstance(last_feedback, CoSTEERMultiFeedback) + and last_feedback[index] is None + ) ): to_be_finished_task_index.append(index) - last_feedback = None - if len(evolving_trace) > 0: - last_feedback = evolving_trace[-1].feedback - assert isinstance(last_feedback, CoSTEERMultiFeedback) - result = multiprocessing_wrapper( [ (