mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-29 08:27:43 +00:00
1d9b4cd2ec
* use CoSTEER as component name * rename factorimplementation to avoid confusion * rename modelimplementation * align benchmark and evolving evaluators * add scenario to evaluator init function * rename all factorimplementationknowledge in CoSTEER * remove all scenario related information in component * remove useless code --------- Co-authored-by: xuyang1 <xuyang1@microsoft.com>
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
"""
|
|
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.proposal import (
|
|
Experiment2Feedback,
|
|
Hypothesis2Experiment,
|
|
HypothesisSet,
|
|
Trace,
|
|
)
|
|
from rdagent.core.task_generator import TaskGenerator
|
|
|
|
# load_from_cls_uri
|
|
|
|
|
|
scen = load_from_cls_uri(MODEL_PROP_SETTING.scen)()
|
|
|
|
hypothesis_gen = load_from_cls_uri(MODEL_PROP_SETTING.hypothesis_gen)(scen)
|
|
|
|
hypothesis2task: Hypothesis2Experiment = load_from_cls_uri(MODEL_PROP_SETTING.hypothesis2task)()
|
|
|
|
task_gen: TaskGenerator = load_from_cls_uri(MODEL_PROP_SETTING.task_gen)(scen) # for implementation
|
|
|
|
imp2feedback: Experiment2Feedback = load_from_cls_uri(MODEL_PROP_SETTING.imp2feedback)(scen) # for implementation
|
|
|
|
|
|
iter_n = MODEL_PROP_SETTING.iter_n
|
|
|
|
trace = Trace()
|
|
|
|
hypothesis_set = HypothesisSet()
|
|
for _ in range(iter_n):
|
|
hypothesis = hypothesis_gen.gen(trace)
|
|
task = hypothesis2task.convert(hypothesis)
|
|
imp = task_gen.gen(task)
|
|
imp.execute()
|
|
feedback = imp2feedback.summarize(imp)
|
|
trace.hist.append((hypothesis, feedback))
|