Skip to content
Merged
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
4 changes: 2 additions & 2 deletions qlib/workflow/task/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ def gen_following_tasks(self, task: dict, test_end: pd.Timestamp) -> List[dict]:
List[dict]:
the following tasks of `task`(`task` itself is excluded)
"""
t = copy.deepcopy(task)
prev_seg = t["dataset"]["kwargs"]["segments"]
prev_seg = task["dataset"]["kwargs"]["segments"]
while True:
segments = {}
try:
Expand All @@ -184,6 +183,7 @@ def gen_following_tasks(self, task: dict, test_end: pd.Timestamp) -> List[dict]:
break

prev_seg = segments
t = copy.deepcopy(task) # deepcopy is necessary to avoid modify task inplace
self._update_task_segs(t, segments)
yield t

Expand Down