preprocessing.py
def parse_logs_into_unique_seq_events(self, raw_log_file, input_dir=None, bert_format=False):
        """
               Prase AWS logs into a sequence-based events such that
               each line contains unique events happened in a row

               output: a list of parsed-log files
               """
        if input_dir is None:
            input_dir = '../logs/AWS/'  # The input directory of log file

        aws_agent = AWSLogAnalyzer(raw_log_file, input_dir, read_all_file=True)
        event_names_list = aws_agent.get_column_from_dataset("eventname")

        output_file = input_dir + "event_list"

        events_per_line = []
        for event in event_names_list:
            if not bert_format:
                event = str(events_encoding[event])
            if event not in events_per_line:
                events_per_line.append(event)
            else:
                with open(output_file, 'a') as output:
                    # pickle.dump(events_per_line, output)
                    output.write(' '.join(events_per_line) + "\n")
                    output.close()

                events_per_line.clear()
                events_per_line.append(event)

        return output_file

               Prase AWS logs into a sequence-based events such that
               each line contains unique events happened in a row

               output: a list of parsed-log files
               
Prase AWS logs into a sequence-based events such that
each line contains unique events happened in a row

a list of parsed-log files
Prase AWS logs into a sequence - based events such that each line contains unique events happened in a row a list of parsed - log files
def parse_logs_into_unique_seq_events(self, raw_log_file, input_dir=None, bert_format=False):
        if input_dir is None:
            input_dir = '../logs/AWS/'  
        aws_agent = AWSLogAnalyzer(raw_log_file, input_dir, read_all_file=True)
        event_names_list = aws_agent.get_column_from_dataset("eventname")
        output_file = input_dir + "event_list"
        events_per_line = []
        for event in event_names_list:
            if not bert_format:
                event = str(events_encoding[event])
            if event not in events_per_line:
                events_per_line.append(event)
            else:
                with open(output_file, 'a') as output:
                    output.write(' '.join(events_per_line) + "\n")
                    output.close()
                events_per_line.clear()
                events_per_line.append(event)
        return output_file
def parse_logs_into_unique_seq_events ( self , raw_log_file , input_dir = None , bert_format = False ) : if input_dir is None : input_dir = '../logs/AWS/' aws_agent = AWSLogAnalyzer ( raw_log_file , input_dir , read_all_file = True ) event_names_list = aws_agent . get_column_from_dataset ( "eventname" ) output_file = input_dir + "event_list" events_per_line = [ ] for event in event_names_list : if not bert_format : event = str ( events_encoding [ event ] ) if event not in events_per_line : events_per_line . append ( event ) else : with open ( output_file , 'a' ) as output : output . write ( ' ' . join ( events_per_line ) + "\n" ) output . close ( ) events_per_line . clear ( ) events_per_line . append ( event ) return output_file
Prase AWS logs into a sequence-based events such that
each line contains unique events happened in a row
Prase AWS logs into a sequence - based events such that each line contains unique events happened in a row
"""
               Prase AWS logs into a sequence-based events such that
               each line contains unique events happened in a row

               output: a list of parsed-log files
               """ # The input directory of log file # pickle.dump(events_per_line, output)
self
raw_log_file
input_dir
bert_format