Closed l0ngc closed 2 months ago
You encountered the same issue as I did. To address it, I implemented the following code in qlib/qlib/contrib/meta/data_selection/dataset.py
at line 183:
d_train = d_train.replace([np.inf, -np.inf], np.nan)
d_test = d_test.replace([np.inf, -np.inf], np.nan)
After that, I navigated to the qlib
directory and executed the following command to install qlib from the source code:
pip install .
Please note that installing from the source code may have specific requirements based on the Python version. In my case, the Python version is 3.8.
You encountered the same issue as I did. To address it, I implemented the following code in
qlib/qlib/contrib/meta/data_selection/dataset.py
at line 183:d_train = d_train.replace([np.inf, -np.inf], np.nan) d_test = d_test.replace([np.inf, -np.inf], np.nan)
After that, I navigated to the
qlib
directory and executed the following command to install qlib from the source code:pip install .
Please note that installing from the source code may have specific requirements based on the Python version. In my case, the Python version is 3.8.
Oh man, I love you. Thanks for your response!!!
可能是代码改变了,183行加不了,不合理,我加代码的地方,供参考
#新加代码
d_train = d_train.replace([np.inf, -np.inf], np.nan)
d_test = d_test.replace([np.inf, -np.inf], np.nan)
#下面是原代码
d_train = d_train.dropna(axis=0)
d_test = d_test.dropna(axis=0)
🐛 Bug Description
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
Expect DDG-DA could work and new rolling training backtest report could be printed.
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.Windows
,Linux
,MacOS
): LinuxAdditional Notes
I also reproduced this BUG on Google Colab, I used T4 GPU and high RAM as my virtual machine.
https://colab.research.google.com/drive/1T5zIiE-LZi9TdzHIlwVmfV5ag1PdQUw1?usp=sharing
In my local server, I used two 4090 GPUs, one AMD EPYC 7763 CPU, and 1T ram. Both produce the same error.