refactor(utils, ai): move chekpoint configs

This commit is contained in:
Kristofers Solo 2024-01-05 17:13:57 +02:00
parent bbdb824e52
commit bd4f30b1b5
2 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,9 @@ def train(
population.add_reporter(neat.StdOutReporter(True))
stats = neat.StatisticsReporter()
population.add_reporter(stats)
population.add_reporter(neat.Checkpointer(5, 900))
population.add_reporter(
neat.Checkpointer(CONFIG.ai.checkpoint_interval, CONFIG.ai.checkpoint_delay)
)
pe = neat.ParallelEvaluator(int(parallel), eval_genome)

View File

@ -66,6 +66,8 @@ class AI:
plot_path: Path = BASE_PATH / "plots"
checkpoint_path: Path = BASE_PATH / "checkpoints"
config_path: Path = BASE_PATH / "config"
checkpoint_interval: int = 10
checkpoint_delay: int = 900
@define