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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: validation_step() takes 3 positional arguments but 4 were given #1034
Comments
This should happen when you return multiple dataloaders. In that case, the signature of validation step should be
Did you copy and run the full MNIST example given in the blog post you linked? |
Yeah, I did copy the full code on the blog. I'll try to add |
I've encountered the same problem:
Whether running this code or the full version at the end of the colab Using:
|
Looks like these notebooks install master, not 0.6.0. |
If I add
|
I encountered this - you need to add the |
Thanks for your fix. I had actually seen this in the Github Doc, just did not think to implement it. For me it fixes the error I was having. |
For me, it fixed it too thanks. |
I'm not fully clear on this - it looks like the basic mnist example does use the decorator. It's not clear if this example is out of date or if other examples are out of date. |
Should I close this issue? Or is this a bug? |
It should stay open. The examples must be updated so they can work with the upcoming release 0.7. |
@williamFalcon bringing this to your attention |
@LuposX fixed on 0.7.1. Happy to reopen the issue if it's still there. |
馃悰 Bug
When running my model I get the error message:
TypeError: validation_step() takes 3 positional arguments but 4 were given
Stacktrace:
To Reproduce
Steps to reproduce the behavior:
pip install pytorch-lightning
Code sample
Here is my validation step:
Expected behavior
No error
Environment
Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce GTX 1050 Ti
Nvidia driver version: 442.19
cuDNN version: Could not collect
Versions of relevant libraries:
[pip3] numpy==1.16.1
[conda] blas 1.0 mkl
[conda] mkl 2020.0 166
[conda] mkl-service 2.3.0 py37hb782905_0
[conda] mkl_fft 1.0.15 py37h14836fe_0
[conda] mkl_random 1.1.0 py37h675688f_0
[conda] pytorch 1.4.0 py3.7_cuda101_cudnn7_0 pytorch
[conda] pytorch-ignite 0.4.0.dev20200229 pypi_0 pypi
[conda] pytorch-lightning 0.6.0 pypi_0 pypi
[conda] torchvision 0.4.1 pypi_0 pypi
[conda] torchviz 0.0.1 pypi_0 pypi
Additional context
Related Issue I think:
#105
The text was updated successfully, but these errors were encountered: