Pytorch Lightning limit_val_batches and val_check_interval behavior
I'm setting limit_val_batches=10 and val_check_interval=1000 so that I'm validating on 10 validation batches every 1000 training steps. Is it guaranteed that Trainer will use the same 10 batches every time validation is called?
I tried search the source code for limit_val_batches but couldn't figure out how it was being used to obtain the validation batches.

The answer doesn't have much to do with PyTorch Lightning and its flags (--limit_val_batches and --val_check_interval). The exact batches of data provided by Lightning inside any of the
def *_step(self, batch, ...):
    ...

methods (* is training/validation/test) is determined by the underlying PyTorch DataLoaders returned by
def *_dataloder(...):
    return DataLoader(dataset, shuffle=..., sampler=..., batch_sampler=...)

If the dataloader returned by these functions DO NOT have shuffle=True or any randomized Samplers, the batches will be same.
As far as --limit_val_batches=N is concerned, it fetches first N batches from the underlying dataloader. Lightning doesn't do any data selection by itself. It is confirmed by a core developer here.
