9a4540b682074d3f84a2fc232cf2a832dc96bce7,src/aggregate_results.py,,latexify,#Any#Any#,92

Before Change


        for run_name in results["valid"].keys():
            for metric, scores in results["valid"][run_name].items():
                res_str = "%s & %s & " % (run_name, metric)
                metric_scores = [(k, v) for k, v in scores.items()]
                metric_scores.sort(key=lambda x: x[0])
                //res_str += "& ".join([average(scores[task]) for task in TASKS if task in scores])
                res_str += " & ".join(["%.3f" % average(scores[k]) for (k, _) in metric_scores])
                res_str += " \\\\\n"
                fh.write(res_str)

// aggregated results

After Change


    with open(out_file, "w") as fh:
        header = "run & metric & "
        run_order, metric_order, task_order = get_orders(results)
        header += " & ".join(task_order) + " \\\\\n"
        header += "\\hline\n"
        fh.write(header)
        for run_name in run_order:
            for metric in metric_order:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: jsalt18-sentence-repl/jiant
Commit Name: 9a4540b682074d3f84a2fc232cf2a832dc96bce7
Time: 2018-01-19
Author: wang.alex.c@gmail.com
File Name: src/aggregate_results.py
Class Name:
Method Name: latexify


Project Name: bokeh/bokeh
Commit Name: 531452908b70f7eeb128c955aebe2e4247e5ee08
Time: 2020-11-01
Author: bryan@bokeh.org
File Name: bokeh/core/property/struct.py
Class Name: Struct
Method Name: __str__


Project Name: hanxiao/bert-as-service
Commit Name: 129f293bc8e87ded5f3a4300b65e643b5e5ef9f0
Time: 2018-12-15
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name: