Skip to content

Conversation

@anish-devgit
Copy link

Summary
Fixes #2045: RollingStrategy should not prepare tasks if interval < rolling_step

What I changed

  • Modified qlib/workflow/online/strategy.py: Added a check in prepare_tasks to return specific empty list if the calculated time interval is less than self.rg.step.

How I tested
Local: Added tests/test_issue_2045.py which mocks RollingGen, TimeAdjuster, and OnlineToolR.

  • Verified that when interval=5 and step=10, prepare_tasks returns [].
  • Verified that when interval=15 and step=10, prepare_tasks returns generated tasks.

Fixes #2045

…re task generation (microsoft#2045)

- Added check in prepare_tasks: if interval < rolling_step, return empty tasks.
- Added reproduction and verification test case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] Why not check if the time interval exceeds the step size

1 participant