From 1826b794c423f506131917b2a6e72b7c6935fa20 Mon Sep 17 00:00:00 2001 From: konglingbai Date: Tue, 9 Dec 2025 23:32:58 +0800 Subject: [PATCH] [fix] handler_mod func don't work when dealing None end date --- qlib/workflow/task/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qlib/workflow/task/gen.py b/qlib/workflow/task/gen.py index bd98e501db..3fd8cf20f9 100644 --- a/qlib/workflow/task/gen.py +++ b/qlib/workflow/task/gen.py @@ -109,7 +109,7 @@ def handler_mod(task: dict, rolling_gen): interval = rolling_gen.ta.cal_interval( task["dataset"]["kwargs"]["handler"]["kwargs"]["end_time"], task["dataset"]["kwargs"]["segments"][rolling_gen.test_key][1], - ) + ) if task["dataset"]["kwargs"]["segments"][rolling_gen.test_key][1] is not None else -1 # if end_time < the end of test_segments, then change end_time to allow load more data if interval < 0: task["dataset"]["kwargs"]["handler"]["kwargs"]["end_time"] = copy.deepcopy(