microsoft/qlib

qlib/qlib/contrib/model /pytorch_tcn_ts.py error

yycyyyc321 opened this issue ยท 0 comments

๐Ÿ› Bug Description

To Reproduce

Steps to reproduce the behavior:

  1. set batch size of model as 2000
  2. set len of infer dataset as 10001
  3. error occur

reason: infer dataset will be split as 5*2000+1, 2000 will be shaped as np.array vector, and 1 will be shaped as np.array scalar.
Calling np.concatenate between vector and scalar will raise error.

Expected Behavior

Screenshot

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.

  • Qlib version:
  • Python version:
  • OS (Windows, Linux, MacOS):
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes