qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Set `time2idx=False` in expression_provider kwargs will cause `unsupported operand type(s) for +: 'Timedelta' and 'int'`

Open PaleNeutron opened this issue 1 year ago • 0 comments

🐛 Bug Description

To Reproduce

Steps to reproduce the behavior:

  1. qlib.init(expression_provider={"class": "LocalExpressionProvider", "kwargs": dict(time2idx=False)})
  2. get feature with P operator "P($$roewa_q)"

Expected Behavior

no error

Screenshot

image

image

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

PaleNeutron avatar Jun 14 '23 05:06 PaleNeutron