-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
The total number of batches shows by the progress bar of the sanity check is wrong #2891
Comments
@manipopopo I guess the first solution gets things done without changing anything else. Mind submitting a PR? |
I think once #2882 gets resolved this issue will be resolved automatically. |
It seems that resolve #2882 will make the sanity check of Resolve this issue will make the |
then I would suggest fixing #2882 first in which we can make self.num_sanity_val_steps to be a list of correct num_steps for each val_dataloader and then we can just do |
It seems that we have several ways to tackle the problem.
It seems that the values of the public member
|
Fixed by #2917. |
this issue is annoying. will fix this. |
🐛 Bug
The
total
of the sanity check progress bar is set byhttps://github.com/PyTorchLightning/pytorch-lightning/blob/4d0406ec8bf1c9147b34eb607411b78a9cd28243/pytorch_lightning/callbacks/progress.py#L296
The progress bar will always show
trainer.num_sanity_val_steps
even if the length of the validationDataLoader
is less thantrainer.num_sanity_val_steps
.Maybe the
total
could be computed byWe use the private function
data_loading._has_len
to check ifdataloader
has__len__
, maybe we could makedata_loading._has_len
public.Or we could make
num_full_val_dataloader_batches
(andnum_full_train_dataloader_batches
) a member variable ofTrainer
and update the value inpytorch_lightning.trainer.data_loading.TrainerDataLoadingMixin
.To Reproduce
The progress bar of the sanity check in the following code (
num_sanity_val_steps == 999
andlen(val_data_loader) == 10
) showsCode sample
Expected behavior
The program above should be
Environment
Additional context
The text was updated successfully, but these errors were encountered: