Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Skinny-Joey opened this issue May 12, 2022 · 1 comment

Comments

@Skinny-Joey
Copy link

Traceback (most recent call last):
File "./decode.py", line 105, in
trainer.test(test_dataloaders=dataloader_mapargs.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
Copy link
Owner

kasnerz commented May 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants