String together the entire factor process

This commit is contained in:
WinstonLiyt
2024-07-11 11:24:41 +00:00
parent f84e90525e
commit 033589bbe0
6 changed files with 19 additions and 37 deletions
+2 -18
View File
@@ -25,6 +25,7 @@ hypothesis_gen: HypothesisGen = import_class(PROP_SETTING.qlib_factor_hypothesis
hypothesis2experiment: Hypothesis2Experiment = import_class(PROP_SETTING.qlib_factor_hypothesis2experiment)()
qlib_factor_coder: TaskGenerator = import_class(PROP_SETTING.qlib_factor_coder)(scen)
qlib_factor_runner: TaskGenerator = import_class(PROP_SETTING.qlib_factor_runner)(scen)
qlib_factor_summarizer: HypothesisExperiment2Feedback = import_class(PROP_SETTING.qlib_factor_summarizer)(scen)
@@ -38,21 +39,4 @@ for _ in range(PROP_SETTING.evolving_n):
exp = qlib_factor_runner.generate(exp)
feedback = qlib_factor_summarizer.generateFeedback(exp, hypothesis, trace)
trace.hist.append((hypothesis, exp, feedback))
"""
trace = Trace(scen=scen)
# for _ in range(PROP_SETTING.evolving_n):
for _ in range(1):
hypothesis = hypothesis_gen.gen(trace)
exp = hypothesis2experiment.convert(hypothesis, trace)
# exp = qlib_factor_coder.generate(exp)
import pickle
file_path = '/home/finco/v-yuanteli/RD-Agent/git_ignore_folder/factor_data_output/exp_new.pkl'
with open(file_path, 'rb') as file:
exp = pickle.load(file)
exp = qlib_factor_runner.generate(exp)
feedback = qlib_factor_summarizer.generateFeedback(exp, hypothesis, trace)
# trace.hist.append((hypothesis, exp, feedback))
"""
trace.hist.append((hypothesis, exp, feedback))