Neural-HMM
Neural-HMM copied to clipboard
val_dataloader error message
Hi, I run the train.py and it shows the following error message , may I have your help? thanks :
pytorch_lightning.utilities.exceptions.MisconfigurationException: val_dataloader must be implemented to be used with the Lightning Trainer
Hello, You have not provided files for the validation set. Either set the validation_files hyperparameter in src/hparams.py or you can turn off validation of your training by adding limit_val_batches=0 in train.py as an additional parameter to pl.Trainer() around line 92.
Hi @shivammehta007 , I tried both the ways but still got the error message, thanks :
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/core/hooks.py", line 599, in val_dataloader
raise MisconfigurationException("val_dataloader must be implemented to be used with the Lightning Trainer")
pytorch_lightning.utilities.exceptions.MisconfigurationException: val_dataloader must be implemented to be used with the Lightning Trainer
Hello, could you give more details about which line raised this issue? Another reason I could think of was during the plotting but if you have already set the validation_files it should have solved it. So I am unsure about it for now.
So the solution for this is to copy the training file location and set limit_val_batches=0.