Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions qlib/contrib/rolling/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ def run_basic_task(self):
trainer = TrainerR(experiment_name=self.exp_name)
trainer([task])

def get_task_list(self) -> List[dict]:
def get_task_list(self, enable_data_handler_cache: Optional[bool] = True) -> List[dict]:
"""return a batch of tasks for rolling."""
task = self.basic_task()
task = self.basic_task(enable_data_handler_cache)
task_l = task_generator(
task, RollingGen(step=self.step, trunc_days=self.horizon + 1)
) # the last two days should be truncated to avoid information leakage
Expand All @@ -203,8 +203,8 @@ def get_task_list(self) -> List[dict]:
t["record"] = ["qlib.workflow.record_temp.SignalRecord"]
return task_l

def _train_rolling_tasks(self):
task_l = self.get_task_list()
def _train_rolling_tasks(self, enable_data_handler_cache: Optional[bool] = True):
task_l = self.get_task_list(enable_data_handler_cache)
self.logger.info("Deleting previous Rolling results")
try:
# TODO: mlflow does not support permanently delete experiment
Expand Down Expand Up @@ -250,10 +250,10 @@ def _update_rolling_rec(self):
r.generate()
print(f"Your evaluation results can be found in the experiment named `{self.exp_name}`.")

def run(self):
def run(self, enable_data_handler_cache: Optional[bool] = True):
# the results will be save in mlruns.
# 1) each rolling task is saved in rolling_models
self._train_rolling_tasks()
self._train_rolling_tasks(enable_data_handler_cache)
# 2) combined rolling tasks and evaluation results are saved in rolling
self._ens_rolling()
self._update_rolling_rec()
Expand Down
4 changes: 4 additions & 0 deletions up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

git pull upstream main
git fetch upstream --tags --prune