Previously the training runs had to be completed before M-LOOP would
halt. This lead to unintuitive behavior when the halting conditions
were early on in the optimization process.
M-LOOP now halts immediately when any of the halting conditions are
met.
Loading branch information...
1 parent
1897106commit cfa5748ebb82d1ac7d23eaab5042e4b056881984michaelhush
committed
Nov 4, 2016
log.info('Controller finished. Closing down M-LOOP. Please wait a moment...')
+ except ControllerInterrupt:
+ self.log.warning('Controller ended by interruption.')
except (KeyboardInterrupt,SystemExit):
log.warning('!!! Do not give the interrupt signal again !!! \n M-LOOP stopped with keyboard interupt or system exit. Please wait at least 1 minute for the threads to safely shut down. \n')
Override _put_params_and_out_dict function, used when the training learner creates parameters. Makes the defualt param_type the training type and sets last_training_run_flag.
+ Attempts to safely cast a numpy array to a list, if not a numpy array just casts to list on the object.
+
+ Args:
+ in_array (array or equivalent): The array (or otherwise) to be converted to a list.
+
+ Returns:
+ list : List of elements from in_array
+
+'''
+
+ ifisinstance(in_array, np.ndarray):
+ t_array = np.squeeze(in_array)
+ if t_array.shape == ():
+ out_list = [t_array[()]]
+ else:
+ out_list =list(t_array)
+ else:
+ out_list =list(in_array)
+
+ return out_list
+
+
classNullQueueListener():
'''
Shell class with start and stop functions that do nothing. Queue listener is not implemented in python 2. Current fix is to simply use the multiprocessing class to pipe straight to the cmd line if running on python 2. This is class is just a placeholder.
0 comments on commit
cfa5748