mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
refactor: replace Evaluator with CoSTEEREvaluator in eva_utils.py (#607)
* refactor: Replace Evaluator with CoSTEEREvaluator in eva_utils.py * fix bug --------- Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
This commit is contained in:
@@ -5,8 +5,8 @@ from typing import Tuple
|
||||
import numpy as np
|
||||
from jinja2 import Environment, StrictUndefined
|
||||
|
||||
from rdagent.components.coder.CoSTEER.evaluators import CoSTEEREvaluator
|
||||
from rdagent.components.coder.model_coder.model import ModelFBWorkspace, ModelTask
|
||||
from rdagent.core.evaluation import Evaluator
|
||||
from rdagent.core.experiment import Task, Workspace
|
||||
from rdagent.core.prompts import Prompts
|
||||
from rdagent.oai.llm_conf import LLM_SETTINGS
|
||||
@@ -53,7 +53,7 @@ def value_evaluator(
|
||||
)
|
||||
|
||||
|
||||
class ModelCodeEvaluator(Evaluator):
|
||||
class ModelCodeEvaluator(CoSTEEREvaluator):
|
||||
def evaluate(
|
||||
self,
|
||||
target_task: Task,
|
||||
@@ -117,7 +117,7 @@ class ModelCodeEvaluator(Evaluator):
|
||||
return critic_response, None
|
||||
|
||||
|
||||
class ModelFinalEvaluator(Evaluator):
|
||||
class ModelFinalEvaluator(CoSTEEREvaluator):
|
||||
def evaluate(
|
||||
self,
|
||||
target_task: Task,
|
||||
|
||||
@@ -104,7 +104,7 @@ class KGExperiment2Feedback(Experiment2Feedback):
|
||||
current_target_action = hypothesis.action
|
||||
current_sub_exps_to_code = {}
|
||||
if hypothesis.action == "Model tuning":
|
||||
current_sub_exps_to_code[exp.sub_tasks[0].get_task_information()] = exp.sub_workspace_list[0].code
|
||||
current_sub_exps_to_code[exp.sub_tasks[0].get_task_information()] = exp.sub_workspace_list[0].all_codes
|
||||
elif hypothesis.action == "Model feature selection":
|
||||
current_sub_exps_to_code[exp.sub_tasks[0].get_task_information()] = exp.experiment_workspace.file_dict[
|
||||
KG_SELECT_MAPPING[exp.sub_tasks[0].model_type]
|
||||
|
||||
Reference in New Issue
Block a user