mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
aider: Added scatter plot of edit_leaderboard
models with released
dates in _posts/2024-05-13-models-over-time.md
.
# Aider chat conversation: USER: draw a scatter plot of the edit_leaderboard models which have `released` dates. With x as the release date, y as the `pass_rate_2` and label each point with the `model` name field. use a chart style similar to the bar graph in the leaderboard.md, but we want a scatter plot for this one. put the scatter plot in the new blog post ASSISTANT: Let's add the scatter plot to the new blog post in `_posts/2024-05-13-models-over-time.md`. Here is the *SEARCH/REPLACE* block to add the scatter plot: _posts/2024-05-13-models-over-time.md ```markdown <<<<<<< SEARCH # LLM code editing skill over time ======= # LLM code editing skill over time <canvas id="scatterPlot" width="800" height="450" style="margin-top: 20px"></canvas> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> document.addEventListener('DOMContentLoaded', function () { var ctx = document.getElementById('scatterPlot').getContext('2d'); var scatterData = { datasets: [{ label: 'Model Performance', data: [ {% for row in site.data.edit_leaderboard %} {% if row.released %} { x: new Date('{{ row.released }}'), y: {{ row.pass_rate_2 }}, label: '{{ row.model }}' }, {% endif %} {% endfor %} ], backgroundColor: 'rgba(54, 162, 235, 0.2)', borderColor: 'rgba(54, 162, 235, 1)', borderWidth: 1, pointRadius: 5, pointHoverRadius: 7 }] }; var scatterChart = new Chart(ctx, { type: 'scatter', data: scatterData, options: { scales: { xAxes: [{ type: 'time', time: { unit: 'month', tooltipFormat: 'll' }, scaleLabel: { display: true, labelString: 'Release Date' } }], yAxes: [{ scaleLabel: { display: true, labelString: 'Pass Rate 2 (%)' }, ticks: { beginAtZero: true } }] }, tooltips: { callbacks: { label: function(tooltipItem, data) { var label = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index].label || ''; return label + ': (' + tooltipItem.xLabel + ', ' + tooltipItem.yLabel + '%)'; } } } } }); }); </script> >>>>>>> REPLACE ```
This commit is contained in:
parent
8f36dff6d8
commit
547a07fadc
1 changed files with 66 additions and 0 deletions
|
@ -4,3 +4,69 @@ excerpt: A comparison of LLM code editing skill based on the release dates of th
|
|||
---
|
||||
# LLM code editing skill over time
|
||||
|
||||
<canvas id="scatterPlot" width="800" height="450" style="margin-top: 20px"></canvas>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('scatterPlot').getContext('2d');
|
||||
var scatterData = {
|
||||
datasets: [{
|
||||
label: 'Model Performance',
|
||||
data: [
|
||||
{% for row in site.data.edit_leaderboard %}
|
||||
{% if row.released %}
|
||||
{
|
||||
x: new Date('{{ row.released }}'),
|
||||
y: {{ row.pass_rate_2 }},
|
||||
label: '{{ row.model }}'
|
||||
},
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1,
|
||||
pointRadius: 5,
|
||||
pointHoverRadius: 7
|
||||
}]
|
||||
};
|
||||
|
||||
var scatterChart = new Chart(ctx, {
|
||||
type: 'scatter',
|
||||
data: scatterData,
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
type: 'time',
|
||||
time: {
|
||||
unit: 'month',
|
||||
tooltipFormat: 'll'
|
||||
},
|
||||
scaleLabel: {
|
||||
display: true,
|
||||
labelString: 'Release Date'
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
scaleLabel: {
|
||||
display: true,
|
||||
labelString: 'Pass Rate 2 (%)'
|
||||
},
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function(tooltipItem, data) {
|
||||
var label = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index].label || '';
|
||||
return label + ': (' + tooltipItem.xLabel + ', ' + tooltipItem.yLabel + '%)';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue