jingedawang / StockPredictor

Predict the stock price with AI models.
http://stockprediction.org/
MIT License
20 stars 6 forks source link

No 'predict' field in some database rows #59

Closed jingedawang closed 1 year ago

jingedawang commented 1 year ago
[1752010:MainThread](2022-11-17 23:11:21,233) WARNING - qlib.workflow - [exp.py:310] - Please make sure the recorder name predict is unique, we will only return the latest recorder if there exist several matched the given name. 83%|████████████████████████████████████████████████████████████████████████████████▋                | 3900/4689 [3:05:25<37:30,  2.85s/it]
[1752010:MainThread](2022-11-17 23:11:24,484) ERROR - qlib.workflow - [utils.py:41] - An exception has been raised[KeyError: 'predict'].
  File "/home/azureuser/projects/StockPredictor/stock_predictor/predict_all.py", line 10, in <module>
    service.predict_all(date=datetime.date.today().strftime('%Y-%m-%d'))
  File "/home/azureuser/projects/StockPredictor/stock_predictor/service.py", line 114, in predict_all
    if row['predict'] is None:
KeyError: 'predict'

This may cause by the newly added stocks. Need to add a complete json row for the new stock.