Hi, I am new to pytorch lightning. Can someone explain what is validation sanity check ?
Thanks in advance!
You do not want run an entire training loop (could take hours) and then realise that there is a problem in your validation loop. This development process is slow and bug-prone, so we run a small validation sanity check to make sure that your code is fine before actually start training the model.
2 Likes
What exactly does it check?
- Does it run the eval code for one batch?
- How can I turn it off ?
- What is num_sanity_val_steps parameter do? In my code it’s -1 but it still does the entire validation sanity check.
It would be a great help if you can also point me to the code/documentation.
Thanks a lot!
the integer value defines the number of validation steps you want to run.
Check the docs here.
Would you mind updating this link? It’s broken atm.
For anyone else seeing this now, to disable sanity checks, pass num_sanity_val_steps=0
to the Trainer. Per here
2 Likes