Beispiel #1
0
 def __elapsed_helper(self, period):
     times = self.stat_aggregates["times"]
     if period == "total_elapsed":
         return "Time: {}".format(sec_to_hms(times[period], as_str=True))
     else:
         return "Time: {}".format(sec_to_hms(times[period][-1],
                                             as_str=True))
Beispiel #2
0
    def on_run_end(self):
        content = list()
        content.append(format_fold_run(fold=self._fold, run=self._run))
        content.append(format_evaluation_results(self.last_evaluation_results, float_format=self.float_format))
        content.append('Time Elapsed: {}'.format(sec_to_hms(self.stat_aggregates['times']['runs'][-1], as_str=True)))

        G.log(self.log_separator.join(content), previous_frame=inspect.currentframe().f_back)
        super().on_run_end()
Beispiel #3
0
    def on_repetition_end(self):
        content = ''
        content += 'Repetition {} AVG:   '.format(self._rep)
        content += format_evaluation_results(self.last_evaluation_results, float_format=self.float_format)
        content += self.log_separator if not content.endswith(' ') else ''
        content += 'Time Elapsed: {}'.format(sec_to_hms(self.stat_aggregates['times']['reps'][-1], as_str=True))

        G.log('', previous_frame=inspect.currentframe().f_back)
        G.log(content, previous_frame=inspect.currentframe().f_back)

        super().on_repetition_end()
Beispiel #4
0
    def on_experiment_end(self):
        content = 'FINAL:    '

        content += format_evaluation_results(self.last_evaluation_results, float_format=self.float_format)
        content += self.log_separator if not content.endswith(' ') else ''

        content += 'Time Elapsed: {}'.format(sec_to_hms(self.stat_aggregates['times']['total_elapsed'], as_str=True))

        G.log('')
        G.log(content, previous_frame=inspect.currentframe().f_back, add_time=False)
        super().on_experiment_end()
    def on_repetition_end(self):
        content = ""
        content += "Repetition {} AVG:   ".format(self._rep)
        content += format_evaluation_results(
            self.last_evaluation_results, float_format=self.float_format
        )
        content += self.log_separator if not content.endswith(" ") else ""
        content += "Time Elapsed: {}".format(
            sec_to_hms(self.stat_aggregates["times"]["reps"][-1], as_str=True)
        )

        G.log("", previous_frame=inspect.currentframe().f_back)
        G.log(content, previous_frame=inspect.currentframe().f_back)
        super().on_repetition_end()
    def on_experiment_end(self):
        content = "FINAL:    "

        content += format_evaluation_results(
            self.last_evaluation_results, float_format=self.float_format
        )
        content += self.log_separator if not content.endswith(" ") else ""

        content += "Time Elapsed: {}".format(
            sec_to_hms(self.stat_aggregates["times"]["total_elapsed"], as_str=True)
        )

        G.log("")
        G.log(content, previous_frame=inspect.currentframe().f_back, add_time=False)
        super().on_experiment_end()