diff --git a/luxonis_train/utils/config.py b/luxonis_train/utils/config.py index fa0ee586..4406c285 100644 --- a/luxonis_train/utils/config.py +++ b/luxonis_train/utils/config.py @@ -236,6 +236,15 @@ def check_num_workes_platform(self): ) return self + @model_validator(mode="after") + def check_validation_interval(self): + if self.validation_interval > self.epochs: + logger.warning( + "Setting `validation_interval` same as `epochs` otherwise no checkpoint would be generated." + ) + self.validation_interval = self.epochs + return self + class OnnxExportConfig(CustomBaseModel): opset_version: int = 12