Files
NexQuant/rdagent/core/evaluation.py
T
you-n-g 5baed909e7 refactor: refactor core framework to better propogate feedbacks (#599)
* refactor: Update type annotations and remove unused class in evolving modules

* refactor: Simplify evolving agent and feedback handling in CoSTEER module

* lint & CI

* mypy

* ruff for core

* mypy

* refactor: remove unnecessary comments and update feedback handling logic

* refactor: Add prev_task_feedback parameter to evolving strategies

* feat: Clear folder before extracting zip file in DockerEnv

* fix: Correct retrieval of last experiment from history
2025-02-16 01:40:44 +08:00

44 lines
1008 B
Python

"""
It is expected to be shared among different frameworks.
"""
from abc import ABC, abstractmethod
class Feedback:
"""
Design Principle:
It will be more like a **dataclass**.
The building process of feedback will should be in evaluator
"""
def __bool__(self) -> bool:
return True
class EvaluableObj:
"""
A set of information that is evaluable. Following things can be included.
- Task
- Solution
- Ground Truth
"""
class Evaluator(ABC):
"""
Design Principle:
It should cover the building process of feedback from raw information.
Typically the building of feedback will be two phases.
1. raw information including stdout & workspace (feedback itself will handle this)
2. advanced/summarized feedback information. (evaluate will handle this)
"""
@abstractmethod
def evaluate(
self,
eo: EvaluableObj,
) -> Feedback:
raise NotImplementedError