#NEWLINE# @ override #NEWLINE# def process_output( self , line ) : #NEWLINE# #INDENT# ( timestamp , level , message ) = self . preprocess_output_digits ( line ) #NEWLINE# if ( not message ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# match = re . match ( 'Progress: ([-+]?[0-9]*\\.?[0-9]+(e[-+]?[0-9]+)?)' , message ) #NEWLINE# if match : #NEWLINE# #INDENT# self . progress = float ( match . group ( 1 ) ) #NEWLINE# self . emit_progress_update ( ) #NEWLINE# return True #NEWLINE# #UNINDENT# match = re . match ( 'Found (\\d+) images in (\\d+) categories' , message ) #NEWLINE# if match : #NEWLINE# #INDENT# self . label_count = int ( match . group ( 2 ) ) #NEWLINE# return True #NEWLINE# #UNINDENT# match = re . match ( 'Selected (\\d+) for (\\w+)' , message ) #NEWLINE# if match : #NEWLINE# #INDENT# if match . group ( 2 ) . startswith ( 'training' ) : #NEWLINE# #INDENT# self . train_count = int ( match . group ( 1 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if match . group ( 2 ) . startswith ( 'validation' ) : #NEWLINE# #INDENT# self . val_count = int ( match . group ( 1 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if match . group ( 2 ) . startswith ( 'test' ) : #NEWLINE# #INDENT# self . test_count = int ( match . group ( 1 ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return True #NEWLINE# #UNINDENT# if ( level == 'warning' ) : #NEWLINE# #INDENT# self . logger . warning ( ( '%s: %s' % ( self . name ( ) , line ) ) ) #NEWLINE# return True #NEWLINE# #UNINDENT# if ( level in [ 'error' , 'critical' ] ) : #NEWLINE# #INDENT# self . logger . error ( ( '%s: %s' % ( self . name ( ) , message ) ) ) #NEWLINE# self . exception = message #NEWLINE# return True #NEWLINE# #UNINDENT# return True