qlib icon indicating copy to clipboard operation
qlib copied to clipboard

不能正确运行LSTM例子

Open moesakura opened this issue 2 years ago • 10 comments

❓ Questions and Help

运行 qrun qlib/examples/benchmarks/LSTM/workflow_config_lstm_Alpha158.yaml

[37672:MainThread](2024-01-16 23:57:08,420) INFO - qlib.LSTM - [pytorch_lstm_ts.py:244] - training...
[37672:MainThread](2024-01-16 23:57:08,420) INFO - qlib.LSTM - [pytorch_lstm_ts.py:248] - Epoch0:
[37672:MainThread](2024-01-16 23:57:08,421) INFO - qlib.LSTM - [pytorch_lstm_ts.py:249] - training...
[37672:MainThread](2024-01-16 23:58:09,626) INFO - qlib.LSTM - [pytorch_lstm_ts.py:251] - evaluating...
[37672:MainThread](2024-01-16 23:59:58,968) INFO - qlib.LSTM - [pytorch_lstm_ts.py:254] - train nan, valid nan

train 和 valid 都是nan

排查了一下 发现是

qlib\contrib\model\pytorch_lstm_ts.py +184
pred = self.LSTM_model(feature.float())
pred 全是Nan

请问是我的问题还是有什么奇怪的bug

moesakura avatar Jan 16 '24 16:01 moesakura

我也是,很奇怪

muhoushaonian avatar Jan 30 '24 09:01 muhoushaonian

多跑几轮就好了 前几轮都是Nan 跑10轮差不多 耐心~

qq78781966 avatar Mar 22 '24 10:03 qq78781966

貌似是catboost的问题,去掉这个我的就能work了。。。

mrwang1992 avatar Mar 28 '24 11:03 mrwang1992

I also encountered the same issue. There was no problem when running LightGBM158 in the example file, but both ALSTM and KRNN resulted in train nan and valid nan issues.

SweetCone1 avatar Jul 26 '24 15:07 SweetCone1