mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 15:37:44 +00:00
refactor: refactor RD-Agent(Q) configuration files (#972)
* refactor rdagent(q) conf files * fix * fix ci
This commit is contained in:
@@ -5,7 +5,6 @@ Pipfile
|
||||
public
|
||||
release-notes.md
|
||||
typescript*
|
||||
qlib
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
||||
@@ -27,7 +27,7 @@ DIRNAME_local = Path.cwd()
|
||||
# #
|
||||
# def execute():
|
||||
# de = DockerEnv()
|
||||
# de.run(local_path=self.ws_path, entry="qrun conf.yaml")
|
||||
# de.run(local_path=self.ws_path, entry="qrun conf_baseline.yaml")
|
||||
|
||||
# TODO: supporting multiprocessing and keep previous results
|
||||
|
||||
@@ -158,17 +158,21 @@ class QlibFactorRunner(CachedRunner[QlibFactorExperiment]):
|
||||
|
||||
# model + combined factors
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name="conf_model_combined.yaml", run_env=env_to_use
|
||||
qlib_config_name="conf_combined_factors_sota_model.yaml", run_env=env_to_use
|
||||
)
|
||||
else:
|
||||
# LGBM + combined factors
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name=f"conf.yaml" if len(exp.based_experiments) == 0 else "conf_combined.yaml"
|
||||
qlib_config_name=(
|
||||
f"conf_baseline.yaml" if len(exp.based_experiments) == 0 else "conf_combined_factors.yaml"
|
||||
)
|
||||
)
|
||||
else:
|
||||
logger.info(f"Experiment execution ...")
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name=f"conf.yaml" if len(exp.based_experiments) == 0 else "conf_combined.yaml"
|
||||
qlib_config_name=(
|
||||
f"conf_baseline.yaml" if len(exp.based_experiments) == 0 else "conf_combined_factors.yaml"
|
||||
)
|
||||
)
|
||||
|
||||
if result is None:
|
||||
|
||||
@@ -79,20 +79,24 @@ class QlibModelRunner(CachedRunner[QlibModelExperiment]):
|
||||
{"dataset_cls": "TSDatasetH", "num_features": num_features, "step_len": 20, "num_timesteps": 20}
|
||||
)
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name="conf_model_combined.yaml", run_env=env_to_use
|
||||
qlib_config_name="conf_sota_factors_model.yaml", run_env=env_to_use
|
||||
)
|
||||
else:
|
||||
env_to_use.update({"dataset_cls": "TSDatasetH", "step_len": 20, "num_timesteps": 20})
|
||||
result, stdout = exp.experiment_workspace.execute(qlib_config_name="conf.yaml", run_env=env_to_use)
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name="conf_baseline_factors_model.yaml", run_env=env_to_use
|
||||
)
|
||||
elif exp.sub_tasks[0].model_type == "Tabular":
|
||||
if exist_sota_factor_exp:
|
||||
env_to_use.update({"dataset_cls": "DatasetH", "num_features": num_features})
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name="conf_model_combined.yaml", run_env=env_to_use
|
||||
qlib_config_name="conf_sota_factors_model.yaml", run_env=env_to_use
|
||||
)
|
||||
else:
|
||||
env_to_use.update({"dataset_cls": "DatasetH"})
|
||||
result, stdout = exp.experiment_workspace.execute(qlib_config_name="conf.yaml", run_env=env_to_use)
|
||||
result, stdout = exp.experiment_workspace.execute(
|
||||
qlib_config_name="conf_baseline_factors_model.yaml", run_env=env_to_use
|
||||
)
|
||||
|
||||
exp.result = result
|
||||
exp.stdout = stdout
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
| RD-Agent(Q) QLib Factor Config File | Description |
|
||||
|------------------------------------------------------------|--------------------------------------------------------------------------------|
|
||||
| `factor_template/conf_baseline.yaml` | Baseline factors (e.g., Alpha20) with the GBDT model |
|
||||
| `factor_template/conf_combined_factors.yaml` | Merged SOTA and newly generated factors with the GBDT model |
|
||||
| `factor_template/conf_combined_factors_sota_model.yaml` | Merged SOTA and newly generated factors with the SoTA-trace-selected model |
|
||||
@@ -1,3 +1,8 @@
|
||||
## This folder is a template to be copied from for each model implementation & running process.
|
||||
|
||||
Components: Dummy model.py, versatile conf.yaml, and a result reader.
|
||||
Components: Dummy model.py, versatile conf.yaml, and a result reader.
|
||||
|
||||
| RD-Agent(Q) QLib Model Config File | Description |
|
||||
|-------------------------------------------------------------|-------------------------------------------------------------------|
|
||||
| `model_template/conf_baseline_factors_model.yaml` | Baseline factors (e.g., Alpha20) with newly generated model |
|
||||
| `model_template/conf_sota_factors_model.yaml` | SOTA factors with newly generated model |
|
||||
|
||||
Reference in New Issue
Block a user