mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-08 12:37:44 +00:00
Further Optimised Kwargs & Confs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pickle
|
||||
from rdagent.app.qlib_rd_loop.conf import PROP_SETTING
|
||||
from rdagent.core.developer import Developer
|
||||
from rdagent.core.exception import ModelEmptyException
|
||||
from rdagent.core.exception import ModelEmptyError
|
||||
from rdagent.core.proposal import (
|
||||
Hypothesis2Experiment,
|
||||
HypothesisExperiment2Feedback,
|
||||
@@ -44,7 +44,7 @@ class Model_RD_Agent:
|
||||
return exp
|
||||
|
||||
def generate_feedback(self, exp, hypothesis):
|
||||
feedback = self.qlib_model_summarizer.generateFeedback(exp, hypothesis, self.trace)
|
||||
feedback = self.qlib_model_summarizer.generate_feedback(exp, hypothesis, self.trace)
|
||||
self.dump_objects(exp=exp, hypothesis=hypothesis, feedback=feedback, trace=self.trace, filename='step_feedback.pkl')
|
||||
return feedback
|
||||
|
||||
@@ -65,39 +65,39 @@ def process_steps(agent):
|
||||
try:
|
||||
_, _, _, trace = agent.load_objects('step_trace.pkl')
|
||||
agent.trace = trace
|
||||
print(trace)
|
||||
print(trace.get_sota_hypothesis_and_experiment())
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
# Step 1: Generate hypothesis
|
||||
try:
|
||||
_, hypothesis, _, _ = agent.load_objects('step_hypothesis.pkl')
|
||||
except FileNotFoundError:
|
||||
hypothesis = agent.generate_hypothesis()
|
||||
# # # Step 1: Generate hypothesis
|
||||
# try:
|
||||
# _, hypothesis, _, _ = agent.load_objects('step_hypothesis.pkl')
|
||||
# except FileNotFoundError:
|
||||
hypothesis = agent.generate_hypothesis()
|
||||
|
||||
# Step 2: Convert hypothesis
|
||||
try:
|
||||
exp, _, _, _ = agent.load_objects('step_experiment.pkl')
|
||||
except FileNotFoundError:
|
||||
exp = agent.convert_hypothesis(hypothesis)
|
||||
# # # Step 2: Convert hypothesis
|
||||
# try:
|
||||
# exp, _, _, _ = agent.load_objects('step_experiment.pkl')
|
||||
# except FileNotFoundError:
|
||||
# exp = agent.convert_hypothesis(hypothesis)
|
||||
|
||||
# Step 3: Generate code
|
||||
try:
|
||||
exp, _, _, _ = agent.load_objects('step_code.pkl')
|
||||
except FileNotFoundError:
|
||||
exp = agent.generate_code(exp)
|
||||
# # # Step 3: Generate code
|
||||
# try:
|
||||
# exp, _, _, _ = agent.load_objects('step_code.pkl')
|
||||
# except FileNotFoundError:
|
||||
# exp = agent.generate_code(exp)
|
||||
|
||||
# Step 4: Run experiment
|
||||
try:
|
||||
exp, _, _, _ = agent.load_objects('step_run.pkl')
|
||||
except FileNotFoundError:
|
||||
exp = agent.run_experiment(exp)
|
||||
# # # Step 4: Run experiment
|
||||
# try:
|
||||
# exp, _, _, _ = agent.load_objects('step_run.pkl')
|
||||
# except FileNotFoundError:
|
||||
# exp = agent.run_experiment(exp)
|
||||
|
||||
# Step 5: Generate feedback
|
||||
feedback = agent.generate_feedback(exp, hypothesis)
|
||||
# # Step 5: Generate feedback
|
||||
# feedback = agent.generate_feedback(exp, hypothesis)
|
||||
|
||||
# Step 6: Append to trace
|
||||
agent.append_to_trace(hypothesis, exp, feedback)
|
||||
# # Step 6: Append to trace
|
||||
# agent.append_to_trace(hypothesis, exp, feedback)
|
||||
|
||||
if __name__ == "__main__":
|
||||
agent = Model_RD_Agent()
|
||||
|
||||
Reference in New Issue
Block a user