added sumbmodules

This commit is contained in:
leno3003 2022-03-30 18:18:50 +02:00
parent 9cbc23be17
commit 5f3cc30440

View file

@ -83,16 +83,16 @@ def trainerThread (s2c, c2s, e,
e.set() #Set the GUI Thread as Ready
if model.get_target_iter() != 0:
answer_filename = 'workspace/interact/interact_dict.pkl'
if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file:
parameters = pickle.load(file)
if parameters['NoInteractiveMode']:
model_save()
os._exit(1)
elif is_reached_goal:
io.log_info('Model already trained to target iteration. You can use preview.')
if is_reached_goal:
answer_filename = 'workspace/interact/interact_dict.pkl'
if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file:
parameters = pickle.load(file)
if parameters['NoInteractiveMode']:
model_save()
os._exit(1)
else:
io.log_info('Model already trained to target iteration. You can use preview.')
else:
io.log_info('Starting. Target iteration: %d. Press "Enter" to stop training and save model.' % ( model.get_target_iter() ) )
else:
@ -172,13 +172,13 @@ def trainerThread (s2c, c2s, e,
model_save()
is_reached_goal = True
io.log_info ('You can use preview now.')
answer_filename = 'workspace/interact/interact_dict.pkl'
if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file:
parameters = pickle.load(file)
if parameters['NoInteractiveMode']:
model_save()
os._exit(1)
answer_filename = 'workspace/interact/interact_dict.pkl'
if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file:
parameters = pickle.load(file)
if parameters['NoInteractiveMode']:
model_save()
os._exit(1)
need_save = False
while time.time() - last_save_time >= save_interval_min*60: