Skip to content

allow val_check_interval to be larger than training dataset size  #5413

@changjonathanc

Description

@changjonathanc

🚀 Feature

allow val_check_interval to be larger than the number of the training batches in one epoch

Motivation

I am using a small datasets, so instead of specifying max_epochs in Trainer, I want to use max_steps and evaluate every val_check_interval , but when val_check_interval is larger than number of batches in training set, there is an error, like this:

`val_check_interval` (100) must be less than or equal to the number of the training batches (24). If you want to disable validation set `limit_val_batches` to 0.0 instead.

Pitch

val_check_interval should't be limited by the number of the training batches in one epoch, it should be a warning, not an error

Alternatives

I am currently using a wrapper to make it an iterable dataset, so it allows me to do that

Additional context

Metadata

Metadata

Assignees

Labels

featureIs an improvement or enhancementhelp wantedOpen to be worked onpriority: 1Medium priority taskpriority: 2Low priority task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions