-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Framework for idea proposal and implementation on RD-Agent (#34)
* Commit init framework * Co-authored-by: Yuante Li (FESCO Adecco Human Resources) <[email protected]> Co-authored-by: XianBW <[email protected]> * 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 <[email protected]> Co-authored-by: xuyang1 <[email protected]>
- Loading branch information
1 parent
da05927
commit 5ff0b66
Showing
63 changed files
with
649 additions
and
1,115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,4 +151,4 @@ typing_extensions==4.9.0 | |
tzdata==2023.4 | ||
urllib3==2.1.0 | ||
yarl==1.9.4 | ||
zipp==3.17.0 | ||
zipp==3.17.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
|
||
# TODO | ||
If we have more efforts, include more scenario. |
12 changes: 9 additions & 3 deletions
12
rdagent/app/factor_extraction_and_implementation/factor_extract_and_implement.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pydantic_settings import BaseSettings | ||
|
||
|
||
class ModelPropSetting(BaseSettings): | ||
"""""" | ||
|
||
scen: str # a.b.c:XXXClass | ||
# TODO: inital keywards should be included in the settings | ||
... | ||
|
||
|
||
MODEL_PROP_SETTING = ModelPropSetting() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
TODO: Model Structure RD-Loop | ||
TODO: move the following code to a new class: Model_RD_Agent | ||
""" | ||
|
||
# import_from | ||
from rdagent.app.model_proposal.conf import MODEL_PROP_SETTING | ||
from rdagent.core.implementation import TaskGenerator | ||
from rdagent.core.proposal import Belief2Task, BeliefSet, Imp2Feedback, Trace | ||
|
||
# load_from_cls_uri | ||
|
||
|
||
scen = load_from_cls_uri(MODEL_PROP_SETTING.scen)() | ||
|
||
belief_gen = load_from_cls_uri(MODEL_PROP_SETTING.belief_gen)(scen) | ||
|
||
belief2task: Belief2Task = load_from_cls_uri(MODEL_PROP_SETTING.belief2task)() | ||
|
||
task_gen: TaskGenerator = load_from_cls_uri(MODEL_PROP_SETTING.task_gen)(scen) # for implementation | ||
|
||
imp2feedback: Imp2Feedback = load_from_cls_uri(MODEL_PROP_SETTING.imp2feedback)(scen) # for implementation | ||
|
||
|
||
iter_n = MODEL_PROP_SETTING.iter_n | ||
|
||
trace = Trace() | ||
|
||
belief_set = BeliefSet() | ||
for _ in range(iter_n): | ||
belief = belief_gen.gen(trace) | ||
task = belief2task.convert(belief) | ||
imp = task_gen.gen(task) | ||
imp.execute() | ||
feedback = imp2feedback.summarize(imp) | ||
trace.hist.append((belief, feedback)) |
8 changes: 5 additions & 3 deletions
8
...p/factor_implementation/eval_implement.py → rdagent/app/quant_factor_benchmark/eval.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 13 additions & 12 deletions
25
...tor_implementation/evolving/evaluators.py → ...tor_implementation/evolving/evaluators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.