bighuang624 / DSANet

Code for the CIKM 2019 paper "DSANet: Dual Self-Attention Network for Multivariate Time Series Forecasting".
https://kyonhuang.top/publication/dual-self-attention-network
260 stars 58 forks source link

No `train_dataloader()` method defined. #6

Open 13121283123 opened 4 years ago

13121283123 commented 4 years ago

大佬 非常感谢您公开的代码 我想引用您的文章 但是我在运行代码的时候遇到以下问题 请问这个是什么原因导致的 pytorch_lightning.utilities.exceptions.MisconfigurationException: No train_dataloader() method defined. Lightning Trainer expects as minimum a training_step(), train_dataloader() and configure_optimizers() to be defined. 非常感谢您的回复

bighuang624 commented 4 years ago

@13121283123 不好意思。距离写这份代码的时间太长了,加上 pytorch_lightning 版本迭代了太多次,不太清楚如何解决这个问题。如果实在想使用,建议自行把 pytorch_lightning 的部分剥离然后写一个训练的过程。其实应该我来做这个事情的,但是最近实在是太忙,希望之后有时间能上传一份重写的代码。

lorrp1 commented 4 years ago

@bighuang624 i followed this: https://www.kaggle.com/kirichenko17roman/dsanet-approach#New-confirmed-cases-prediction using the last version of pytorch_lightning return the error of this issue but with 0.7.3 its working.

also the kaggle version use the a gpu version so im wondering if you release also the .py for the gpu because im having an hard time using their code, i dont understand all the conversion from dataframe to np array for the training data and how to get test the model at the end