Easy way to run evaluation every n-th epoch? #5214
-
Hi! Currently, if a validation or test dataset is provided, evaluation occurs at the end of each epoch during training. I am wondering if there is an easy way to modify this so that evaluation only occurs after every n-th epoch (or something like that). The motivation is that my evaluation takes much longer than a training epoch, so I would rather it not run after each epoch, especially in situations like hyperparameter tuning. I think I could get this behaviour by setting |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I have a similar feature request, where I'd like to skip validation for the first few epochs since I know the performance will be ready bad early on in training. Changing We could probably tackle both of these cases by adding a flag in the trainer |
Beta Was this translation helpful? Give feedback.
I have a similar feature request, where I'd like to skip validation for the first few epochs since I know the performance will be ready bad early on in training. Changing
batches_per_epoch
is not ideal for this use-case since that effects the frequency of checkpoints later in on training, which I'd like to avoid.We could probably tackle both of these cases by adding a flag in the trainer
_should_validate_this_epoch: bool = True
or something, which could be modified by aTrainerCallback
each epoch.