added sumbmodules

This commit is contained in:
leno3003 2022-03-30 17:53:18 +02:00
parent b7c5e649e3
commit 7f43f7aeca

View file

@ -82,9 +82,6 @@ def trainerThread (s2c, c2s, e,
e.set() #Set the GUI Thread as Ready e.set() #Set the GUI Thread as Ready
if model.get_target_iter() != 0: if model.get_target_iter() != 0:
if is_reached_goal:
io.log_info('Model already trained to target iteration. You can use preview.')
answer_filename = 'workspace/interact/interact_dict.pkl' answer_filename = 'workspace/interact/interact_dict.pkl'
if os.path.exists(answer_filename): if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file: with open(answer_filename, 'rb') as file:
@ -92,6 +89,9 @@ def trainerThread (s2c, c2s, e,
if parameters['NoInteractiveMode']: if parameters['NoInteractiveMode']:
model_save() model_save()
os._exit(1) os._exit(1)
elif is_reached_goal:
io.log_info('Model already trained to target iteration. You can use preview.')
else: else:
io.log_info('Starting. Target iteration: %d. Press "Enter" to stop training and save model.' % ( model.get_target_iter() ) ) io.log_info('Starting. Target iteration: %d. Press "Enter" to stop training and save model.' % ( model.get_target_iter() ) )
else: else: