automatized arguments with pickle

This commit is contained in:
leno3003 2022-03-29 12:26:54 +02:00
parent d132667138
commit b3134a99d0
2 changed files with 7 additions and 2 deletions

View file

@ -84,6 +84,8 @@ def trainerThread (s2c, c2s, e,
if model.get_target_iter() != 0:
if is_reached_goal:
io.log_info('Model already trained to target iteration. You can use preview.')
model_save()
os._exit(1)
else:
io.log_info('Starting. Target iteration: %d. Press "Enter" to stop training and save model.' % ( model.get_target_iter() ) )
else:
@ -163,7 +165,8 @@ def trainerThread (s2c, c2s, e,
model_save()
is_reached_goal = True
io.log_info ('You can use preview now.')
exit(0)
model_save()
os._exit(1)
need_save = False
while time.time() - last_save_time >= save_interval_min*60: