fix save in trainer

This commit is contained in:
iperov 2021-10-11 15:02:41 +04:00
parent 0a203bb25e
commit 91f0f30a78

View File

@ -163,9 +163,13 @@ def trainerThread (s2c, c2s, e,
model_save() model_save()
is_reached_goal = True is_reached_goal = True
io.log_info ('You can use preview now.') io.log_info ('You can use preview now.')
if not is_reached_goal and (time.time() - last_save_time) >= save_interval_min*60: need_save = False
while time.time() - last_save_time >= save_interval_min*60:
last_save_time += save_interval_min*60 last_save_time += save_interval_min*60
need_save = True
if not is_reached_goal and need_save:
model_save() model_save()
send_preview() send_preview()