Files
NexQuant/rdagent/core/proposal/__init__.py
T
Xu Yang 6b626eb56d New Framework for idea proposal and implementation on RD-Agent (#34)
* Commit init framework

* Co-authored-by: Yuante Li (FESCO Adecco Human Resources) <v-yuanteli@microsoft.com>
Co-authored-by: XianBW <XianBW@users.noreply.github.com>

* add an import

* refine the whole framework

* benchmark related framework

* fix black and isort errors

* move requirements to folder

* fix black again

---------

Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: xuyang1 <xuyang1@microsoft.com>
2024-06-28 11:45:23 +08:00

96 lines
1.9 KiB
Python

"""
"""
from typing import Tuple
from rdagent.core.task import BaseTask, TaskLoader
# class data_ana: XXX
class Belief:
"""
TODO: We may have better name for it.
Name Candidates:
- Hypothesis
"""
# source: data_ana | model_nan = None
# Origin(path of repo/data/feedback) => view/summarization => generated Belief
class Scenario:
def get_repo_path(self):
"""codebase"""
def get_data(self):
""" "data info"""
def get_env(self):
"""env description"""
class Trace:
scen: Scenario
hist: list[Tuple[Belief, Feedback]]
class BeliefGen:
def __init__(self, scen: Scenario):
self.scen = scen
def gen(self, trace: Trace) -> Belief:
# def gen(self, scenario_desc: str, ) -> Belief:
"""
Motivation of the variable `scenario_desc`:
- Mocking a data-scientist is observing the scenario.
scenario_desc may conclude:
- data observation:
- Original or derivative
- Task information:
"""
class BeliefSet:
"""
# drop, append
belief_imp: list[float] | None # importance of each belief
failed_belief or success belief
"""
belief_l: list[Belief]
feedbacks: Dict[Tuple[Belief, Scenario], BeliefFeedback]
class Belief2Task(TaskLoader):
"""
[Abstract description => conceret description] => Code implement
"""
def convert(self, bs: BeliefSet) -> BaseTask:
"""Connect the idea proposal to implementation"""
...
class BeliefFeedback:
...
# Boolean, Reason, Confidence, etc.
class Imp2Feedback:
""" "Generated(summarize) feedback from **Executed** Implemenation"""
def summarize(self, ti: TaskImplementation) -> BeliefFeedback:
"""
The `ti` should be exectued and the results should be included.
For example: `mlflow` of Qlib will be included.
"""