1
Fork 0

feat: abstracted checkpoint eval configs

This commit is contained in:
Jona Reynaert 2026-05-07 13:45:03 +02:00
parent 67c459ca94
commit b91908bf7a
8 changed files with 55 additions and 30 deletions

View file

@ -18,13 +18,6 @@ class LoggingConfig:
upload_final_model: bool = False
upload_checkpoints: bool = False
# Checkpoint evaluation (synchronous, in-process)
# When enabled, each saved checkpoint is evaluated headlessly and the results
# are appended to a CSV in the run's metrics/ folder.
evaluate_checkpoints: bool = False
eval_max_steps: int = 5000
eval_seed: int = 0
hf_entity: str = ""
def __post_init__(self):
@ -39,19 +32,5 @@ class LoggingConfig:
"both 'track' and 'save_checkpoints' to also be True."
)
if self.evaluate_checkpoints:
if not self.save_checkpoints:
raise ValueError(
"Configuration Error: 'evaluate_checkpoints' is True, but it requires "
"'save_checkpoints' to also be True."
)
if self.checkpoint_frequency <= 0:
raise ValueError(
"Configuration Error: 'evaluate_checkpoints' is True, but it requires "
"'checkpoint_frequency' to be > 0."
)
if self.eval_max_steps <= 0:
raise ValueError(
"Configuration Error: 'eval_max_steps' must be > 0 when "
"'evaluate_checkpoints' is enabled."
)
# NOTE: Checkpoint evaluation settings live under the project's
# `evaluation` config group (see brittle_star_project.configs).