mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
aider: Reversed the order of the bars from short to tall.
# Aider chat conversation: USER: reverse the order of the bars, so they go short->tall ASSISTANT: To reverse the order of the bars from short to tall, we can reverse the order of the `models` and `pass_rates` lists before plotting: benchmark/swe_bench_lite.py ```python <<<<<<< SEARCH models = [] pass_rates = [] for line in lines: if line.strip(): pass_rate, model = line.split("%") model = model.strip() model = model.replace("|", "\n") models.append(model.strip()) pass_rates.append(float(pass_rate.strip())) ======= models = [] pass_rates = [] for line in lines: if line.strip(): pass_rate, model = line.split("%") model = model.strip() model = model.replace("|", "\n") models.insert(0, model.strip()) pass_rates.insert(0, float(pass_rate.strip())) >>>>>>> REPLACE ``` This change uses `insert(0, ...)` instead of `append()` to add each model and pass rate to the beginning of their respective lists. This will effectively reverse the order, so the bars will be plotted from shortest to tallest.
This commit is contained in:
parent
bfe91ae191
commit
b8feaed5f9
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@ def plot_swe_bench_lite(data_file):
|
|||
pass_rate, model = line.split("%")
|
||||
model = model.strip()
|
||||
model = model.replace("|", "\n")
|
||||
models.append(model.strip())
|
||||
pass_rates.append(float(pass_rate.strip()))
|
||||
models.insert(0, model.strip())
|
||||
pass_rates.insert(0, float(pass_rate.strip()))
|
||||
|
||||
plt.rcParams["hatch.linewidth"] = 0.5
|
||||
plt.rcParams["hatch.color"] = "#444444"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue