kasnerz / zeroshot-d2t-pipeline

Code for the paper Neural Pipeline for Zero-Shot Data-to-Text Generation
Apache License 2.0
15 stars 6 forks source link

TypeError: test() got an unexpected keyword argument 'test_dataloaders' #1

Open Skinny-Joey opened 2 years ago

Skinny-Joey commented 2 years ago

Traceback (most recent call last): File "./decode.py", line 105, in trainer.test(test_dataloaders=dataloader_map[args.split](), model=di.model) TypeError: test() got an unexpected keyword argument 'test_dataloaders'

When I run decode.py, the program returns the following error. I'm not sure if it's because of the version

kasnerz commented 2 years ago

Yes, it sounds like a problem with your version of Pytorch Lightning. Which version are you using? And have you tried the recommended version 1.5.10 (see requirements.txt)?

From what I was able to find, it seems the keyword has changed from test_dataloaders in 1.5.10 to dataloaders in the current version. So as a hotfix, you may try renaming the argument.

However, PL is going through rapid development and there may be some other subtle changes which may influence the training process (I still have in fresh memory changing the default value max_steps from None to -1 which totally broke the scheduler semantics), so it is generally better set up a new virtual environment and use the recommended version.