Separate data and view for benchmarks (#451)

* separate data and view for benchmarks

* fixed typo
This commit is contained in:
Markus Paff 2020-10-06 10:30:19 +02:00 committed by GitHub
parent 465ccbc12e
commit 25f34babce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 76 additions and 80 deletions

View File

@ -1,36 +0,0 @@
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable(
[
["Model", "Top 10 Accuracy", "Time"],
["RoBERTa", 72.22222222222222, 56.033346766999784],
["MiniLM", 38.88888888888889, 49.28621050500078],
["BERT base", 31.48148148148148, 42.67899718899935],
["BERT large", 53.70370370370371, 74.21550956300052],
["XLMR large", 72.22222222222222, 76.56486266000047]
]);
var options = {
chart: {
title: 'Reader Performance',
subtitle: 'Time and Accuracy Benchmarks',
},
bars: 'horizontal' // Required for Material Bar Charts.
};
var chart = new google.charts.Bar(document.getElementById('barchart_material'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
</script>
</head>
<body>
<div id="barchart_material" style="width: 900px; height: 500px;"></div>
</body>
</html>

View File

@ -0,0 +1,39 @@
{
"chart_type": "BarChart",
"title": "Reader Performance",
"subtitle": "Time and Accuracy Benchmarks",
"description": "",
"bars": "horizontal",
"columns": [
"Model",
"Top 10 Accuracy",
"Time"
],
"data": [
{
"model": "RoBERTa",
"accuracy": 72.22222222222222,
"time": 56.033346766999784
},
{
"model": "MiniLM",
"accuracy": 38.88888888888889,
"time": 49.28621050500078
},
{
"model": "BERT base",
"accuracy": 31.48148148148148,
"time": 42.67899718899935
},
{
"model": "BERT large",
"accuracy": 53.70370370370371,
"time": 74.21550956300052
},
{
"model": "XLMR large",
"accuracy": 72.22222222222222,
"time": 76.56486266000047
}
]
}

View File

@ -1,44 +0,0 @@
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable(
[
["Model", "Recall", "Index Time", "Query Time"],
["BM24 (Elasticsearch)", 1.0, 3.868239733, 0.47588522500000074],
["DPR (FAISS)", 0.9629629629629629, 18.181850872000723, 1.358759985992947,],
]);
var options = {
chart: {
title: 'Reader Performance',
subtitle: 'Time and Accuracy Benchmarks',
},
bars: 'horizontal', // Required for Material Bar Charts.
series: {
0: { axis: 'recall' }, // Bind series 0 to an axis named 'distance'.
1: { axis: 'time' }, // Bind series 1 to an axis named 'brightness'.
2: { axis: 'time' } // Bind series 1 to an axis named 'brightness'.
},
axes: {
x: {
recall: {label: 'recall'}, // Bottom x-axis.
time: {side: 'top', label: 'seconds'} // Top x-axis.
}
}
};
var chart = new google.charts.Bar(document.getElementById('barchart_material'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
</script>
</head>
<body>
<div id="barchart_material" style="width: 900px; height: 500px;"></div>
</body>
</html>

View File

@ -0,0 +1,37 @@
{
"chart_type": "BarChart",
"title": "Retriever Performance",
"subtitle": "Time and Accuracy Benchmarks",
"description": "",
"bars": "horizontal",
"columns": [
"Model",
"Recall",
"Index Time",
"Query Time"
],
"series": {
"s0": "recall",
"s1": "time",
"s2": "time"
},
"axes": {
"label": "recall",
"time_side": "top",
"time_label": "seconds"
},
"data": [
{
"model": "BM25 (Elasticsearch)",
"recall": 1.0,
"index_time": 3.868239733,
"query_time": 0.47588522500000074
},
{
"model": "DPR (FAISS)",
"recall": 0.9629629629629629,
"index_time": 18.181850872000723,
"query_time": 1.358759985992947
}
]
}