Commit graph

531 commits

Author SHA1 Message Date
Paul Gauthier
1b539e4466 rename 2024-06-01 07:04:12 -07:00
Paul Gauthier
7623b8e2e6 copy 2024-06-01 07:03:58 -07:00
Paul Gauthier
6a2d7e08c2 copy 2024-05-31 13:32:20 -07:00
Paul Gauthier
2c6b472946 copy 2024-05-31 11:28:38 -07:00
Paul Gauthier
676b644df4 aider: Added more whitespace below the graph to give more room for the note.
# Aider chat conversation:

USER: add more white space below the graph, to give more room for the note

ASSISTANT: Here is the change to add more white space below the graph:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.tight_layout(pad=3.0)
=======
    plt.tight_layout(pad=3.0, rect=[0, 0.05, 1, 1])
>>>>>>> REPLACE
```

This adjusts the `tight_layout` call to reserve 5% of the figure height at the bottom for the note, using the `rect` parameter. The `rect` tuple specifies the left, bottom, right and top of the area the subplots should occupy as a fraction of figure width and height.
2024-05-31 11:26:27 -07:00
Paul Gauthier
38ac9de678 use underscores in graph fnames 2024-05-31 09:44:33 -07:00
Paul Gauthier
0120d434ff added draft article 2024-05-31 09:33:31 -07:00
Paul Gauthier
639121bb45 full swe bench graph 2024-05-31 08:16:49 -07:00
Paul Gauthier
20ee2bbf36 aider: Increase white space at the bottom of the plot to make room for the note by adjusting the plt.tight_layout call to include more padding.
# Aider chat conversation:

USER: add some white space at the bottom to make more room for the note

ASSISTANT: To add more white space at the bottom of the plot to make room for the note, we can adjust the `plt.tight_layout` call to include more padding.

Here is the *SEARCH/REPLACE* block:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.tight_layout(pad=3.0)
=======
    plt.tight_layout(pad=5.0)
>>>>>>> REPLACE
```
2024-05-31 07:44:28 -07:00
Paul Gauthier
8bcebfa475 Added a note at the bottom of the graph in swe_bench_lite.py. 2024-05-31 07:44:27 -07:00
Paul Gauthier
ffec28cc15 aider: Added note at the bottom of the graph explaining the number of instances processed by the agent.
# Aider chat conversation:

USER: no, add it to the bottom of the graph

ASSISTANT: To add a note at the bottom of the graph explaining that (570) and (2294) refer to the number of instances processed by the agent, we can use the `text` function from Matplotlib to place the note at the bottom of the plot.

Here is the *SEARCH/REPLACE* block to make this change:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
ax.xaxis.label.set_color(font_color)
=======
ax.xaxis.label.set_color(font_color)

# Add note at the bottom of the graph
note = "(570) and (2294) refer to the number of instances that were processed by the agent."
plt.figtext(0.5, 0.01, note, wrap=True, horizontalalignment='center', fontsize=10, color=font_color)
>>>>>>> REPLACE
```
2024-05-31 07:42:33 -07:00
Paul Gauthier
d017b9b23f aider: Add note explaining that (570) and (2294) refer to the number of instances processed by the agent.
# Aider chat conversation:

USER: add a note at the bottom that explains that (570) and (2294) refer to the number of instances that were processed by the agent

ASSISTANT: Here is the change to add a note at the bottom of the script explaining that (570) and (2294) refer to the number of instances processed by the agent.

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
ax.xaxis.label.set_color(font_color)
=======
ax.xaxis.label.set_color(font_color)

# Note: (570) and (2294) refer to the number of instances that were processed by the agent.
>>>>>>> REPLACE
```
2024-05-31 07:42:18 -07:00
Paul Gauthier
4d02a8aa58 Refactored plot_swe_bench_lite function to dynamically handle file names and titles. 2024-05-31 07:42:17 -07:00
Paul Gauthier
6966936316 Updated graph to use pass@1 unhinted results from other agents 2024-05-30 15:29:33 -07:00
Paul Gauthier
d5ca9b3696 updated autocoderover results 2024-05-30 09:45:02 -07:00
Paul Gauthier
689786a875 copy 2024-05-25 12:14:48 -07:00
Paul Gauthier
c86e258551 added proper data 2024-05-24 15:05:31 -07:00
Paul Gauthier
9d20b5f43a use swe-bench-lite.txt 2024-05-23 13:56:17 -07:00
Paul Gauthier
b8feaed5f9 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.
2024-05-23 13:12:57 -07:00
Paul Gauthier
c0f5cbb9b5 copy 2024-05-23 10:03:43 -07:00
Paul Gauthier
5ff4deb12e aider: Increased font weight for "Aider" labels to make them more visually distinct.
# Aider chat conversation:

USER: there's no visible difference bwteen the bold and light fonts?

ASSISTANT: To make the bold font more visible, we can increase the font weight. Here are the changes:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
        fontweight = "bold" if "Aider" in model else "normal"
=======
        fontweight = 800 if "Aider" in model else "normal"
>>>>>>> REPLACE
```

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
            label.set_fontweight("bold")
=======
            label.set_fontweight(800)
>>>>>>> REPLACE
```

This sets the font weight to 800 for the "Aider" labels, which should make them bolder and more visibly distinct from the other labels.
2024-05-23 10:01:57 -07:00
Paul Gauthier
a03e36f7f7 Increased the font size of "Aider" labels in the SWE benchmark plot. 2024-05-23 10:01:55 -07:00
Paul Gauthier
ed43cd278a aider: Ensure bold and light fonts are visibly different by using "normal" instead of "light" for the non-Aider bars.
# Aider chat conversation:

USER: there's no visible difference bwteen the bold and light fonts?

ASSISTANT: To ensure that the bold and light fonts are visibly different, we can use "normal" instead of "light" for the non-Aider bars. This should provide a more noticeable contrast.

Here are the *SEARCH/REPLACE* blocks:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
        fontweight = "bold" if "Aider" in model else "light"
=======
        fontweight = "bold" if "Aider" in model else "normal"
>>>>>>> REPLACE
```

Let's make this change and see if it improves the visibility of the font differences.
2024-05-23 10:01:14 -07:00
Paul Gauthier
6d75a10c8b Changed font weight to "light" for model "Aider" in plot_swe_bench_lite. 2024-05-23 10:01:12 -07:00
Paul Gauthier
d37bace5d7 aider: Make the percentages on top of Aider's bars and the Aider x labels bold.
# Aider chat conversation:

USER: make the percentages on top of aiders bars bold. make the aider x labels bold too

ASSISTANT: To make the percentages on top of Aider's bars bold and the Aider x labels bold, we need to modify the text properties in the plotting section.

Here are the *SEARCH/REPLACE* blocks:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
        if "Aider" in model:
            y = yval + 0.75
            va = "bottom"
        else:
            y = yval - 1.25
            va = "top"

        ax.text(
            bar.get_x() + bar.get_width() / 2,
            y,
            f"{yval}%",
            ha="center",
            va=va,
            fontsize=14,
            # alpha=0.75,
        )
=======
        y = yval + 0.75 if "Aider" in model else yval - 1.25
        va = "bottom" if "Aider" in model else "top"
        fontweight = "bold" if "Aider" in model else "normal"

        ax.text(
            bar.get_x() + bar.get_width() / 2,
            y,
            f"{yval}%",
            ha="center",
            va=va,
            fontsize=14,
            fontweight=fontweight,
        )
>>>>>>> REPLACE
```

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.xticks(
        # rotation=45,
        # ha="center",
        fontsize=16,
        color=font_color,
    )
=======
    xticks = plt.xticks(
        fontsize=16,
        color=font_color,
    )
    for label in xticks[1]:
        if "Aider" in label.get_text():
            label.set_fontweight("bold")
>>>>>>> REPLACE
```
2024-05-23 09:56:04 -07:00
Paul Gauthier
cf1140ba71 Updated colors and alpha values for Aider models in SWE benchmark plot. 2024-05-23 09:56:03 -07:00
Paul Gauthier
484f625b2c copy 2024-05-23 09:49:47 -07:00
Paul Gauthier
ee7dcd5071 aider: Adjust alpha values for bars based on model name containing "Aider".
# Aider chat conversation:

USER: can we use more alpha for the aider bars and less alpha for the other bars?

ASSISTANT: To adjust the alpha values for the bars, we need to modify the section where the bars are created and set their alpha values based on whether the model name contains "Aider".

Here is the *SEARCH/REPLACE* block:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    bars = ax.bar(models, pass_rates, color=colors, alpha=0.75, zorder=3)
=======
    bars = []
    for model, pass_rate, color in zip(models, pass_rates, colors):
        alpha = 0.9 if "Aider" in model else 0.5
        bar = ax.bar(model, pass_rate, color=color, alpha=alpha, zorder=3)
        bars.append(bar[0])
>>>>>>> REPLACE
```
2024-05-23 09:48:53 -07:00
Paul Gauthier
15669b7ae8 copy 2024-05-23 08:28:42 -07:00
Paul Gauthier
2f3baf7cdd copy 2024-05-23 08:04:37 -07:00
Paul Gauthier
15c228097b copy 2024-05-23 07:45:54 -07:00
Paul Gauthier
cdf4969c01 copy 2024-05-22 20:24:10 -07:00
Paul Gauthier
9f2554fed7 copy 2024-05-22 15:33:11 -07:00
Paul Gauthier
fcfc05e2d3 aider: Make the x and y axis labels also #555.
# Aider chat conversation:

USER: make the x and y axis labels also #555

ASSISTANT: Here are the changes to make the x and y axis labels also #555 in `benchmark/swe_bench_lite.py` and `benchmark/over_time.py`:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    ax.set_ylabel("Pass rate (%)", fontsize=18)
    ax.set_title("SWE Bench Lite", fontsize=20)
    ax.set_ylim(0, 30)
    plt.xticks(rotation=45, ha="right", fontsize=16)
    plt.tight_layout(pad=3.0)
    plt.savefig("swe_bench_lite.jpg")
    plt.savefig("swe_bench_lite.svg")
    imgcat(fig)
=======
    ax.set_ylabel("Pass rate (%)", fontsize=18, color="#555")
    ax.set_title("SWE Bench Lite", fontsize=20)
    ax.set_ylim(0, 30)
    plt.xticks(rotation=45, ha="right", fontsize=16)
    plt.tight_layout(pad=3.0)
    plt.savefig("swe_bench_lite.jpg")
    plt.savefig("swe_bench_lite.svg")
    imgcat(fig)
    ax.xaxis.label.set_color("#555")
>>>>>>> REPLACE
```

benchmark/over_time.py
```python
<<<<<<< SEARCH
    ax.set_xlabel("Model release date", fontsize=18)
    ax.set_ylabel("Aider code editing benchmark,\npercent completed correctly", fontsize=18)
    ax.set_title("LLM code editing skill by model release date", fontsize=20)
    ax.set_ylim(0, 30)
    plt.xticks(fontsize=14)
    plt.tight_layout(pad=3.0)
    plt.savefig("tmp_over_time.png")
    plt.savefig("tmp_over_time.svg")
    imgcat(fig)
=======
    ax.set_xlabel("Model release date", fontsize=18, color="#555")
    ax.set_ylabel("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(0, 30)
    plt.xticks(fontsize=14)
    plt.tight_layout(pad=3.0)
    plt.savefig("tmp_over_time.png")
    plt.savefig("tmp_over_time.svg")
    imgcat(fig)
>>>>>>> REPLACE
```
2024-05-22 15:29:58 -07:00
Paul Gauthier
c3b8caf480 Update text color to "#555" in swe_bench_lite.py. 2024-05-22 15:29:57 -07:00
Paul Gauthier
1f7ff54717 aider: Set font color using plt.rcParams to resolve KeyError for unrecognized key "font.color".
# Aider chat conversation:

USER: KeyError: 'Unrecognized key "font.color" for group "font" and name "color"'

ASSISTANT: To fix the `KeyError` related to the unrecognized key "font.color", we need to set the font color using `plt.rcParams` instead of `rc`.

Here are the changes:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"})
=======
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
    plt.rcParams["text.color"] = "#444444"
>>>>>>> REPLACE
```

benchmark/over_time.py
```python
<<<<<<< SEARCH
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"})
=======
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
    plt.rcParams["text.color"] = "#444444"
>>>>>>> REPLACE
```
2024-05-22 15:28:44 -07:00
Paul Gauthier
81ac2e18cc aider: Changed font color to dark grey in benchmark/swe_bench_lite.py and benchmark/over_time.py.
# Aider chat conversation:

USER: make the font color dark grey not black

ASSISTANT: Here are the changes to make the font color dark grey instead of black in `benchmark/swe_bench_lite.py` and `benchmark/over_time.py`:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
=======
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"})
>>>>>>> REPLACE
```

benchmark/over_time.py
```python
<<<<<<< SEARCH
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
=======
    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10, "color": "#444444"})
>>>>>>> REPLACE
```
2024-05-22 15:28:30 -07:00
Paul Gauthier
5ba549834c Change the figure size in swe_bench_lite plot from 10x6 to 10x5. 2024-05-22 15:28:28 -07:00
Paul Gauthier
0b01b7caf5 copy 2024-05-22 15:26:16 -07:00
Paul Gauthier
19e7823859 aider: Add more whitespace around the perimeter.
# Aider chat conversation:

USER: add more whitespace around the perimeter

ASSISTANT: Here are the changes to add more whitespace around the perimeter in `benchmark/swe_bench_lite.py` and `benchmark/over_time.py`:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.tight_layout()
=======
    plt.tight_layout(pad=3.0)
>>>>>>> REPLACE
```

benchmark/over_time.py
```python
<<<<<<< SEARCH
    plt.tight_layout()
=======
    plt.tight_layout(pad=3.0)
>>>>>>> REPLACE
```
2024-05-22 15:18:45 -07:00
Paul Gauthier
aac19f5911 Update xticks fontsize to 16 in swe_bench_lite.py. 2024-05-22 15:18:44 -07:00
Paul Gauthier
a6ae4cab06 aider: Make the model labels on the x axis larger.
# Aider chat conversation:

USER: make the model labels on the x axis larger

ASSISTANT: Here are the changes to make the model labels on the x-axis larger in `benchmark/swe_bench_lite.py` and `benchmark/over_time.py`:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.xticks(rotation=45, ha='right')
=======
    plt.xticks(rotation=45, ha='right', fontsize=14)
>>>>>>> REPLACE
```

benchmark/over_time.py
```python
<<<<<<< SEARCH
    plt.tight_layout()
=======
    plt.xticks(fontsize=14)
    plt.tight_layout()
>>>>>>> REPLACE
```
2024-05-22 15:18:20 -07:00
Paul Gauthier
6765b12a7d Update plot_swe_bench_lite function to handle model names with '|' by replacing it with newline character and adjusting bar colors and transparency. 2024-05-22 15:18:18 -07:00
Paul Gauthier
5ef96a32e2 aider: Set the y-axis to go to 30.
# Aider chat conversation:

USER: make the y-axis go to 30

ASSISTANT: Here are the changes to make the y-axis go to 30 in `benchmark/swe_bench_lite.py`:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.xticks(rotation=45, ha='right')
=======
    ax.set_ylim(0, 30)
    plt.xticks(rotation=45, ha='right')
>>>>>>> REPLACE
```

Here are the changes to make the y-axis go to 30 in `benchmark/over_time.py`:

benchmark/over_time.py
```python
<<<<<<< SEARCH
    plt.tight_layout()
=======
    ax.set_ylim(0, 30)
    plt.tight_layout()
>>>>>>> REPLACE
```
2024-05-22 15:14:38 -07:00
Paul Gauthier
d1bbcb9bf8 Change pass rate label to lowercase and update colors in SWE Bench Lite plot. 2024-05-22 15:14:37 -07:00
Paul Gauthier
5761218b9a aider: Add imgcat to display the graph after saving it.
# Aider chat conversation:

USER: save it as a png and svg and imgcat it out

ASSISTANT: To save the graph as a PNG and SVG and then display it using `imgcat`, we need to modify `benchmark/swe_bench_lite.py`:

1. Import `imgcat`.
2. Add `imgcat` to display the graph after saving it.

Here are the *SEARCH/REPLACE* blocks:

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
from matplotlib import rc
=======
from matplotlib import rc
from imgcat import imgcat
>>>>>>> REPLACE
```

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
    plt.show()
=======
    imgcat(fig)
    plt.show()
>>>>>>> REPLACE
```
2024-05-22 15:13:01 -07:00
Paul Gauthier
c9349d6e23 Updated SWE Bench Lite to display pass rates by model with adjusted colors and title. 2024-05-22 15:13:00 -07:00
Paul Gauthier
61019093a2 aider: Added code to plot a vertical bar graph of data from tmp.txt in swe_bench_lite.py.
# Aider chat conversation:

USER: plot a vertical bar graph of the data in tmp.txt. use similar fonts, colors and graph style to the one in over_time.py. put the new graph code in swe_bench_lite.py

ASSISTANT: Here is the code to plot a vertical bar graph of the data in `tmp.txt` using similar fonts, colors, and graph style to the one in `over_time.py`. This code will be placed in `swe_bench_lite.py`.

benchmark/swe_bench_lite.py
```python
<<<<<<< SEARCH
=======
import matplotlib.pyplot as plt
from matplotlib import rc

def plot_swe_bench_lite(data_file):
    with open(data_file, "r") as file:
        lines = file.readlines()

    models = []
    pass_rates = []

    for line in lines:
        if line.strip():
            pass_rate, model = line.split("%")
            models.append(model.strip())
            pass_rates.append(float(pass_rate.strip()))

    plt.rcParams["hatch.linewidth"] = 0.5
    plt.rcParams["hatch.color"] = "#444444"

    rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})

    fig, ax = plt.subplots(figsize=(10, 5))
    ax.grid(axis="y", zorder=0, lw=0.2)
    for spine in ax.spines.values():
        spine.set_edgecolor("#DDDDDD")
        spine.set_linewidth(0.5)

    colors = [
        "red" if "Aider" in model else "green" if "AutoCodeRover" in model else "blue" for model in models
    ]
    bars = ax.bar(models, pass_rates, color=colors, alpha=0.5, zorder=3)

    for bar in bars:
        yval = bar.get_height()
        ax.text(bar.get_x() + bar.get_width()/2, yval + 0.5, f'{yval}%', ha='center', va='bottom', fontsize=12, alpha=0.75)

    ax.set_xlabel("Models", fontsize=18)
    ax.set_ylabel("Pass Rate (%)", fontsize=18)
    ax.set_title("SWE Benchmark Pass Rates by Model", fontsize=20)
    plt.xticks(rotation=45, ha='right')
    plt.tight_layout()
    plt.savefig("swe_bench_lite.png")
    plt.savefig("swe_bench_lite.svg")
    plt.show()

# Example usage
plot_swe_bench_lite("benchmark/tmp.txt")
>>>>>>> REPLACE
```
2024-05-22 15:11:22 -07:00
Paul Gauthier
ca18220b77 num_with_malformed_responses 2024-05-19 14:19:06 -07:00
Paul Gauthier
74c0df8df8 svg 2024-05-15 11:54:00 -07:00