mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
b7fcb13c33
* Use ExtendedBaseSettings to replace BaseSettings * update a more general way to pass the default setting * update all code * fix CI * fix CI * fix qlib scenario * fix CI * fix CI * fix CI & add data science interfaces * remove redundant code * abandon costeer knowledge base v1 --------- Co-authored-by: Xu Yang <xuyang1@microsoft.com> Co-authored-by: XianBW <36835909+XianBW@users.noreply.github.com>
19 lines
855 B
Python
19 lines
855 B
Python
from rdagent.components.coder.CoSTEER.evaluators import CoSTEERSingleFeedback
|
|
from rdagent.components.coder.CoSTEER.evolvable_subjects import EvolvingItem
|
|
from rdagent.core.evolving_agent import RAGEvoAgent
|
|
from rdagent.core.evolving_framework import EvolvableSubjects
|
|
|
|
|
|
class FilterFailedRAGEvoAgent(RAGEvoAgent):
|
|
def filter_evolvable_subjects_by_feedback(
|
|
self, evo: EvolvableSubjects, feedback: CoSTEERSingleFeedback
|
|
) -> EvolvableSubjects:
|
|
assert isinstance(evo, EvolvingItem)
|
|
assert isinstance(feedback, list)
|
|
assert len(evo.sub_workspace_list) == len(feedback)
|
|
|
|
for index in range(len(evo.sub_workspace_list)):
|
|
if evo.sub_workspace_list[index] is not None and feedback[index] and not feedback[index].final_decision:
|
|
evo.sub_workspace_list[index].clear()
|
|
return evo
|