Skip to content

Commit

Permalink
set max bound of validation interval to epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
klemen1999 committed Jul 11, 2024
1 parent 7c31555 commit fcb1284
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions luxonis_train/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fcb1284

Please sign in to comment.