feat: add incremental inference helper#2255
Open
gyx09212214-prog wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a lightweight helper for users who update their local qlib data themselves and only need predictions for newly available dates.
The new helper configures an existing
DatasetHso the handler loading window includes the required historical warmup rows while the prediction segment stays limited to the incremental date range. ForTSDatasetH, the warmup length is inferred fromstep_len - 1unlesshist_refis provided explicitly.Fixes #2073.
Changes
get_inference_hist_ref,get_incremental_inference_config, andprepare_incremental_inference_datasetinqlib.workflow.online.update.DSBasedUpdater.prepare_datato keep the existing online updater behavior aligned with the public helper.TSDatasetHwarmup inference, and validation errors.Validation
python -m py_compile qlib\workflow\online\update.py tests\rolling_tests\test_incremental_inference.pygit diff --checkI also attempted
python -m pytest tests\rolling_tests\test_incremental_inference.py -qlocally on Windows. Collection is blocked before the new tests run because the source checkout does not have the compiled qlib Cython extension (qlib.data._libs.rolling), and building it requires Microsoft Visual C++ Build Tools in this environment.