예제 #1
0
 def add_summary_report(self, path):
     summary_results = report.parse_log(path)
     html_str = report.summary.make_report(self.time,
                                           summary_results,
                                           self.subsuite_results)
     path = "report.html"
     self.zip_file.writestr(path, html_str)
예제 #2
0
 def add_subsuite_report(self, path):
     results = report.parse_log(path)
     self.subsuite_results.append(results)
     if not results.is_pass:
         html_str = report.subsuite.make_report(results)
         path = "%s/report.html" % results.name
         self.zip_file.writestr(path, html_str)
예제 #3
0
    def add_subsuite_report(self, path, result_files):
        results = report.parse_log(path)

        # prepare embeded file data
        files_map = {}
        for path in result_files:
            if os.path.exists(path):
                file_name = os.path.split(path)[1]
                with open(path, "r") as f:
                    files_map[file_name] = f.read()
                self.zip_file.writestr("%s/%s" % (results.name, os.path.basename(path)), files_map[file_name])
        results.set("files", files_map)

        self.subsuite_results[results.name] = {}
        self.subsuite_results[results.name]["files"] = files_map
        self.subsuite_results[results.name]["results"] = results
        self.subsuite_results[results.name]["html_str"] = report.subsuite.make_report(results)

        path = "%s/report.html" % results.name
        self.zip_file.writestr(path, self.subsuite_results[results.name]["html_str"])

        if results.has_regressions:
            return results.regressions
        else:
            return None
예제 #4
0
 def add_summary_report(self, path):
     summary_results = report.parse_log(path)
     html_str = report.summary.make_report(self.time, summary_results,
                                           self.subsuite_results,
                                           [path, self.profile_path])
     path = "report.html"
     self.zip_file.writestr(path, html_str)
예제 #5
0
    def add_subsuite_report(self, path, result_files):
        results = report.parse_log(path)

        # prepare embeded file data
        files_map = {}
        for path in result_files:
            if os.path.exists(path):
                file_name = os.path.split(path)[1]
                with open(path, 'r') as f:
                    files_map[file_name] = f.read()
                self.zip_file.writestr(
                    "%s/%s" % (results.name, os.path.basename(path)),
                    files_map[file_name])
        results.set('files', files_map)

        self.subsuite_results[results.name] = {}
        self.subsuite_results[results.name]['files'] = files_map
        self.subsuite_results[results.name]['results'] = results
        self.subsuite_results[
            results.name]['html_str'] = report.subsuite.make_report(results)

        path = "%s/report.html" % results.name
        self.zip_file.writestr(path,
                               self.subsuite_results[results.name]['html_str'])

        if results.has_regressions:
            return results.regressions
        else:
            return None
예제 #6
0
def best(path, what='valid_Error_rate'):
    res = parse_log(path, [what])
    return min(res[what])
예제 #7
0
    if y_steps is None and y is not None:
        y_steps = range(len(y))

    plt.plot(x_steps, x, ls='-', c=color, lw=2, label=xlabel)
    if y is not None:
        plt.plot(y_steps, y, c=color, lw=2, label=ylabel)


def best(path, what='valid_Error_rate'):
    res = parse_log(path, [what])
    return min(res[what])


to_be_plotted = ['train_cost_total']
to_be_plotted = ['valid_approx_cost_class_clean']
yaxis = 'Cross Entropy'
titles = ['train ladder standard', 'valid ladder standard', 'train no bn', 'valid no bn']
main_title = 'no batch-norm'

log = ojoin(sys.argv[1], 'log.txt')
# print best(log)
results = parse_log(log, to_be_plotted)
plt.figure()
plot(results, titles[0], titles[1], 'b')

#pimp(yaxis=yaxis, y_lim=[5, 13], title=main_title)
pimp(yaxis=yaxis, y_lim=[.05, .5], title=main_title)
plt.savefig(sys.argv[2])
plt.show()

# pc.call('open ' + sys.argv[2], shell=True)
예제 #8
0
def best(path, what='valid_Error_rate'):
    res = parse_log(path, [what])
    return min(res[what])
예제 #9
0
    plt.plot(x_steps, x, ls='-', c=color, lw=2, label=xlabel)
    if y is not None:
        plt.plot(y_steps, y, c=color, lw=2, label=ylabel)


def best(path, what='valid_Error_rate'):
    res = parse_log(path, [what])
    return min(res[what])


to_be_plotted = ['train_cost_total']
to_be_plotted = ['valid_approx_cost_class_clean']
yaxis = 'Cross Entropy'
titles = [
    'train ladder standard', 'valid ladder standard', 'train no bn',
    'valid no bn'
]
main_title = 'no batch-norm'

log = ojoin(sys.argv[1], 'log.txt')
# print best(log)
results = parse_log(log, to_be_plotted)
plt.figure()
plot(results, titles[0], titles[1], 'b')

#pimp(yaxis=yaxis, y_lim=[5, 13], title=main_title)
pimp(yaxis=yaxis, y_lim=[.05, .5], title=main_title)
plt.savefig(sys.argv[2])
plt.show()

# pc.call('open ' + sys.argv[2], shell=True)