Skip to content

Enable trainer val_check_interval to be greater than number of the training batches #4406

@Vozf

Description

@Vozf

Currently I can't set val_check_interval greater than number of the training batches
Error occurs

/site-packages/pytorch_lightning/trainer/data_loading.py", line 203, in reset_train_dataloader
    raise ValueError(
ValueError: `val_check_interval` (1000000) must be less than or equal to the number of the training batches (5). If you want to disable validation set `limit_val_batches` to 0.0 instead.

But it is a useful feature when validation takes considerate time. I want to do validation after multiple train epochs(but fixed number of steps, so I can't use check_val_every_n_epoch)

cc @Borda @tchaton @justusschock @awaelchli

Metadata

Metadata

Assignees

No one assigned

    Labels

    designIncludes a design discussionfeatureIs an improvement or enhancementhelp wantedOpen to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions