Get wrong data uri when updating expression cache
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48.7k
- Forks
- 7.7k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Description
When updating DiskExpressionCache, it raises KeyError because it tries to get data uri from the DEFAULT_FREQ while I have specified several other freqs.
To Reproduce
Call DiskExpressionCache().update() when specifying several freqs when initiating qlib server.
Expected Behavior
Correctly update the cache without error.
Environment
Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.
- Qlib version: 0.9.8.dev11+g348228907.d20250915
- Python version: 3.8.20 (default, Oct 3 2024, 15:24:27) [GCC 11.2.0]
- OS (
Windows,Linux,MacOS): Linux - Commit number (optional, please provide it if you are using the dev version): 213eb6c2
Additional Notes
I think just inputting freq in C.dpm.get_data_uri() at line 593 in qlib.data.cache can solve the problem.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in qlib.data.cache at DiskExpressionCache.update() and inspect the C.dpm.get_data_uri() call around line 593, especially how frequency is selected. Reproduce the update with several configured frequencies and confirm it completes without a KeyError when the cache is refreshed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100