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
header += "\\hline\n"
fh.write(header)
for run_name in run_order:
for metric in metric_order:
if not len(results["valid"][run_name][metric]):
continue
res_str = "%s & %s" % (run_name, metric)
scores = results["valid"][run_name][metric]
for task in task_order:
try:
res_str += " & %.3f" % average(scores[task])
except:
pdb.set_trace()
res_str += " \\\\\n"
fh.write(res_str)
// aggregated results
// structure is something like
// run name: results
// stopping criteria : metric : scores
all_results = {"valid": defaultdict(lambda: defaultdict(lambda: defaultdict(list))),
"test": defaultdict(lambda: defaultdict(lambda: defaultdict(list)))}
// aggregate results
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
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: astroML/astroML
Commit Name: 72cb7a23af6fbe31367cbfcbbe13994455708593
Time: 2019-01-02
Author: bsipocz@gmail.com
File Name: doc/sphinxext/numpy_ext/docscrape.py
Class Name: ClassDoc
Method Name: __init__
Project Name: sahana/eden
Commit Name: d0836dd9d191d5a0f0b944e8a71cedaeb2c05724
Time: 2020-07-15
Author: fran@aidiq.com
File Name: modules/s3/s3task.py
Class Name: S3Task
Method Name: run_async