-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix(online): add interval check to RollingStrategy to prevent premature task generation (#2045) #2083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…re task generation (microsoft#2045) - Added check in prepare_tasks: if interval < rolling_step, return empty tasks. - Added reproduction and verification test case.
|
@anish-devgit please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Summary
Fixes #2045: RollingStrategy should not prepare tasks if interval < rolling_step
What I changed
qlib/workflow/online/strategy.py: Added a check inprepare_tasksto return specific empty list if the calculated time interval is less thanself.rg.step.How I tested
Local: Added
tests/test_issue_2045.pywhich mocksRollingGen,TimeAdjuster, andOnlineToolR.interval=5andstep=10,prepare_tasksreturns[].interval=15andstep=10,prepare_tasksreturns generated tasks.Fixes #2045