Skip to content

Commit 8d27eae

Browse files
authored
refactor: refactor RD-Agent(Q) configuration files (#972)
* refactor rdagent(q) conf files * fix * fix ci
1 parent 0b1c445 commit 8d27eae

File tree

10 files changed

+27
-10
lines changed

10 files changed

+27
-10
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Pipfile
55
public
66
release-notes.md
77
typescript*
8-
qlib
98

109
# Byte-compiled / optimized / DLL files
1110
__pycache__/

rdagent/scenarios/qlib/developer/factor_runner.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# #
2828
# def execute():
2929
# de = DockerEnv()
30-
# de.run(local_path=self.ws_path, entry="qrun conf.yaml")
30+
# de.run(local_path=self.ws_path, entry="qrun conf_baseline.yaml")
3131

3232
# TODO: supporting multiprocessing and keep previous results
3333

@@ -158,17 +158,21 @@ def develop(self, exp: QlibFactorExperiment) -> QlibFactorExperiment:
158158

159159
# model + combined factors
160160
result, stdout = exp.experiment_workspace.execute(
161-
qlib_config_name="conf_model_combined.yaml", run_env=env_to_use
161+
qlib_config_name="conf_combined_factors_sota_model.yaml", run_env=env_to_use
162162
)
163163
else:
164164
# LGBM + combined factors
165165
result, stdout = exp.experiment_workspace.execute(
166-
qlib_config_name=f"conf.yaml" if len(exp.based_experiments) == 0 else "conf_combined.yaml"
166+
qlib_config_name=(
167+
f"conf_baseline.yaml" if len(exp.based_experiments) == 0 else "conf_combined_factors.yaml"
168+
)
167169
)
168170
else:
169171
logger.info(f"Experiment execution ...")
170172
result, stdout = exp.experiment_workspace.execute(
171-
qlib_config_name=f"conf.yaml" if len(exp.based_experiments) == 0 else "conf_combined.yaml"
173+
qlib_config_name=(
174+
f"conf_baseline.yaml" if len(exp.based_experiments) == 0 else "conf_combined_factors.yaml"
175+
)
172176
)
173177

174178
if result is None:

rdagent/scenarios/qlib/developer/model_runner.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,24 @@ def develop(self, exp: QlibModelExperiment) -> QlibModelExperiment:
7979
{"dataset_cls": "TSDatasetH", "num_features": num_features, "step_len": 20, "num_timesteps": 20}
8080
)
8181
result, stdout = exp.experiment_workspace.execute(
82-
qlib_config_name="conf_model_combined.yaml", run_env=env_to_use
82+
qlib_config_name="conf_sota_factors_model.yaml", run_env=env_to_use
8383
)
8484
else:
8585
env_to_use.update({"dataset_cls": "TSDatasetH", "step_len": 20, "num_timesteps": 20})
86-
result, stdout = exp.experiment_workspace.execute(qlib_config_name="conf.yaml", run_env=env_to_use)
86+
result, stdout = exp.experiment_workspace.execute(
87+
qlib_config_name="conf_baseline_factors_model.yaml", run_env=env_to_use
88+
)
8789
elif exp.sub_tasks[0].model_type == "Tabular":
8890
if exist_sota_factor_exp:
8991
env_to_use.update({"dataset_cls": "DatasetH", "num_features": num_features})
9092
result, stdout = exp.experiment_workspace.execute(
91-
qlib_config_name="conf_model_combined.yaml", run_env=env_to_use
93+
qlib_config_name="conf_sota_factors_model.yaml", run_env=env_to_use
9294
)
9395
else:
9496
env_to_use.update({"dataset_cls": "DatasetH"})
95-
result, stdout = exp.experiment_workspace.execute(qlib_config_name="conf.yaml", run_env=env_to_use)
97+
result, stdout = exp.experiment_workspace.execute(
98+
qlib_config_name="conf_baseline_factors_model.yaml", run_env=env_to_use
99+
)
96100

97101
exp.result = result
98102
exp.stdout = stdout
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
| RD-Agent(Q) QLib Factor Config File | Description |
2+
|------------------------------------------------------------|--------------------------------------------------------------------------------|
3+
| `factor_template/conf_baseline.yaml` | Baseline factors (e.g., Alpha20) with the GBDT model |
4+
| `factor_template/conf_combined_factors.yaml` | Merged SOTA and newly generated factors with the GBDT model |
5+
| `factor_template/conf_combined_factors_sota_model.yaml` | Merged SOTA and newly generated factors with the SoTA-trace-selected model |
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
## This folder is a template to be copied from for each model implementation & running process.
22

3-
Components: Dummy model.py, versatile conf.yaml, and a result reader.
3+
Components: Dummy model.py, versatile conf.yaml, and a result reader.
4+
5+
| RD-Agent(Q) QLib Model Config File | Description |
6+
|-------------------------------------------------------------|-------------------------------------------------------------------|
7+
| `model_template/conf_baseline_factors_model.yaml` | Baseline factors (e.g., Alpha20) with newly generated model |
8+
| `model_template/conf_sota_factors_model.yaml` | SOTA factors with newly generated model |

0 commit comments

Comments
 (0)