mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
style: Organize imports and apply linter formatting
This commit is contained in:
parent
6d6d763dd3
commit
c189a52e5e
1 changed files with 16 additions and 13 deletions
|
@ -1,10 +1,12 @@
|
|||
from dataclasses import dataclass
|
||||
from datetime import date
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import yaml
|
||||
from imgcat import imgcat
|
||||
from matplotlib import rc
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Tuple, Dict
|
||||
from datetime import date
|
||||
|
||||
|
||||
@dataclass
|
||||
class ModelData:
|
||||
|
@ -56,6 +58,7 @@ class ModelData:
|
|||
return "Mistral"
|
||||
return model
|
||||
|
||||
|
||||
class BenchmarkPlotter:
|
||||
LABEL_FONT_SIZE = 16
|
||||
|
||||
|
@ -78,7 +81,7 @@ class BenchmarkPlotter:
|
|||
model = ModelData(
|
||||
name=entry["model"].split("(")[0].strip(),
|
||||
release_date=entry["released"],
|
||||
pass_rate=entry["pass_rate_2"]
|
||||
pass_rate=entry["pass_rate_2"],
|
||||
)
|
||||
models.append(model)
|
||||
return models
|
||||
|
@ -126,9 +129,7 @@ class BenchmarkPlotter:
|
|||
def set_labels_and_style(self, ax: plt.Axes):
|
||||
ax.set_xlabel("Model release date", fontsize=18, color="#555")
|
||||
ax.set_ylabel(
|
||||
"Aider code editing benchmark,\npercent completed correctly",
|
||||
fontsize=18,
|
||||
color="#555"
|
||||
"Aider code editing benchmark,\npercent completed correctly", fontsize=18, color="#555"
|
||||
)
|
||||
ax.set_title("LLM code editing skill by model release date", fontsize=20)
|
||||
ax.set_ylim(30, 90)
|
||||
|
@ -147,9 +148,11 @@ class BenchmarkPlotter:
|
|||
self.set_labels_and_style(ax)
|
||||
self.save_and_display(fig)
|
||||
|
||||
|
||||
def main():
|
||||
plotter = BenchmarkPlotter()
|
||||
plotter.plot("aider/website/_data/edit_leaderboard.yml")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue