microsoft / qlib

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
https://qlib.readthedocs.io/en/latest/
MIT License
14.55k stars 2.53k forks source link

不能正确运行LSTM例子 #1734

Open moesakura opened 5 months ago

moesakura commented 5 months ago

❓ 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

muhoushaonian commented 5 months ago

我也是,很奇怪

qq78781966 commented 3 months ago

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

mrwang1992 commented 3 months ago

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