Set `time2idx=False` in expression_provider kwargs will cause `unsupported operand type(s) for +: 'Timedelta' and 'int'`
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 48.7k
- Forks
- 7.7k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Description
To Reproduce
Steps to reproduce the behavior:
qlib.init(expression_provider={"class": "LocalExpressionProvider", "kwargs": dict(time2idx=False)})- get feature with P operator "P($$roewa_q)"
Expected Behavior
no error
Screenshot
Environment
Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.
Linux
x86_64
Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
#1 SMP Fri Jan 27 02:56:13 UTC 2023
Python version: 3.8.16 (default, Dec 7 2022, 01:12:06) [GCC 11.3.0]
Qlib version: 0.9.1.99
numpy==1.23.5
pandas==1.5.3
scipy==1.10.1
requests==2.31.0
sacred==0.8.4
python-socketio==5.8.0
redis==4.5.5
python-redis-lock==4.0.0
schedule==1.2.0
cvxpy==1.3.1
hyperopt==0.1.2
fire==0.5.0
statsmodels==0.14.0
xlrd==2.0.1
plotly==5.15.0
matplotlib==3.7.1
tables==3.8.0
pyyaml==6.0
mlflow==1.30.0
tqdm==4.65.0
loguru==0.7.0
lightgbm==3.3.5
tornado==6.3.2
joblib==1.2.0
fire==0.5.0
ruamel.yaml==0.17.31
Additional Notes
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 by reproducing the issue through qlib.init with LocalExpressionProvider configured with time2idx=False, then follow the P operator path for the expression "P($$roewa_q)". Done means this expression completes without the Timedelta-and-int error and the behavior is covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- backend, data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100