Commit graph

2097 commits

Author SHA1 Message Date
paul-gauthier
0062f69d9e
Update benchmarks.md 2023-06-30 17:06:24 -07:00
paul-gauthier
1abbba2831
Update benchmarks.md 2023-06-30 17:00:32 -07:00
paul-gauthier
280daf52d0
Update benchmarks.md 2023-06-30 16:59:50 -07:00
paul-gauthier
e3dac04035
Update benchmarks.md 2023-06-30 16:43:39 -07:00
paul-gauthier
f40d7edb5c
Update benchmarks.md 2023-06-30 16:43:16 -07:00
paul-gauthier
080d0c54e4
Update benchmarks.md 2023-06-30 16:42:22 -07:00
Paul Gauthier
d5dce29f37 copy 2023-06-30 16:40:04 -07:00
paul-gauthier
e65f10ce9d
Update benchmarks.md 2023-06-30 15:09:12 -07:00
paul-gauthier
156c9f7300
Update benchmarks.md 2023-06-30 15:07:53 -07:00
paul-gauthier
34cdd4faa6
Update benchmarks.md 2023-06-30 15:03:43 -07:00
Paul Gauthier
94cd0e4f7f copy 2023-06-30 14:41:03 -07:00
Paul Gauthier
c2b1bc7e07 copy 2023-06-30 14:36:35 -07:00
Paul Gauthier
8c73a7be35 copy 2023-06-30 14:33:45 -07:00
Paul Gauthier
6610a8310c copy 2023-06-30 14:31:36 -07:00
Paul Gauthier
6e84bdc20c copy 2023-06-30 14:29:46 -07:00
Paul Gauthier
303ff11c32 copy 2023-06-30 14:19:12 -07:00
Paul Gauthier
e2e511040b copy 2023-06-30 14:18:57 -07:00
Paul Gauthier
a31245ea09 copy 2023-06-30 14:16:51 -07:00
Paul Gauthier
ae9df00043 copy 2023-06-30 14:11:26 -07:00
Paul Gauthier
108328b4be CI should only check tests 2023-06-30 14:02:37 -07:00
Paul Gauthier
ca306b6a4a remove the 1 try results 2023-06-30 14:01:29 -07:00
Paul Gauthier
c793511957 copy 2023-06-30 13:48:01 -07:00
Paul Gauthier
cd6a278684 copy 2023-06-30 13:45:40 -07:00
Paul Gauthier
e6123624d8 copy 2023-06-30 13:44:58 -07:00
Paul Gauthier
d8735ce136 copy 2023-06-30 13:41:59 -07:00
Paul Gauthier
af8a136ae3 copy 2023-06-30 13:41:32 -07:00
Paul Gauthier
9ea1c0dee1 Skip benchmark tests normally 2023-06-30 13:37:24 -07:00
Paul Gauthier
2ce5576aa9 copy 2023-06-30 13:36:25 -07:00
Paul Gauthier
2ee31fd251 copy 2023-06-30 13:34:23 -07:00
Paul Gauthier
433ae9d687 copy 2023-06-30 13:30:15 -07:00
Paul Gauthier
f9b0d3f0d4 copy 2023-06-30 13:23:34 -07:00
Paul Gauthier
061920f896 copy 2023-06-30 13:09:46 -07:00
Paul Gauthier
9f23baebe8 added svg 2023-06-30 13:08:32 -07:00
Paul Gauthier
7c56363d86 copy 2023-06-30 13:07:24 -07:00
Paul Gauthier
956493dc0e added doc 2023-06-30 12:20:51 -07:00
Paul Gauthier
f84e3d6ab7 show both tries; repeats 2023-06-30 10:20:06 -07:00
Paul Gauthier
a9cc3f81b2 nice graph 2023-06-30 06:44:37 -07:00
Paul Gauthier
cba75a3bfe prettier 2023-06-29 22:08:09 -07:00
Paul Gauthier
73f99996df aider: Set bar color/fill style for each edit-format in show_stats function using a color map.
# Context:
USER: how can i set the bar color/fill style for each edit-format
ASSISTANT: To set the bar color/fill style for each edit-format, you need to modify the `show_stats` function in the `benchmark/benchmark.py` file.

Here are the steps:

1. Define a dictionary mapping each edit-format to a specific color or fill style.
2. Use the `color` or `fill` parameter in the `plot` function to set the color or fill style for each bar.

Here is the code change:

```python
benchmark/benchmark.py
<<<<<<< ORIGINAL
    fig, ax = plt.subplots(figsize=(10, 6))
    df_grouped2.unstack().plot(kind="barh", ax=ax)
=======
    fig, ax = plt.subplots(figsize=(10, 6))
    color_map = {"edit_format1": "blue", "edit_format2": "green", "edit_format3": "red"}  # Define your color map here
    df_grouped2.unstack().plot(kind="barh", ax=ax, color=[color_map[i] for i in df_grouped2.index])
>>>>>>> UPDATED
```

Please replace `"edit_format1"`, `"edit_format2"`, and `"edit_format3"` with your actual edit formats, and `"blue"`, `"green"`, and `"red"` with your desired colors.
2023-06-29 20:56:58 -07:00
Paul Gauthier
a02cadbc36 tight 2023-06-29 20:56:12 -07:00
Paul Gauthier
490a59cba4 copy 2023-06-29 20:47:49 -07:00
Paul Gauthier
cf171bdd1e noop 2023-06-29 19:43:06 -07:00
Paul Gauthier
a577a76a44 check for dup model/edit rows 2023-06-29 19:11:28 -07:00
Paul Gauthier
0c9deaa118 aider: Sort the grouped columns by descending average.
# Context:
USER: sort the grouped columns by descending average
ASSISTANT: To sort the grouped columns by descending average, we need to modify the `show_stats` function in the `benchmark/benchmark.py` file. Specifically, we need to sort the `df_grouped` DataFrame by its values in descending order.

Here is the change:

```python
benchmark/benchmark.py
<<<<<<< ORIGINAL
    df_grouped = df.groupby(["model", "edit_format"])["pass_rate_1"].mean()
=======
    df_grouped = df.groupby(["model", "edit_format"])["pass_rate_1"].mean().sort_values(ascending=False)
>>>>>>> UPDATED
```

This change will sort the grouped DataFrame `df_grouped` by its values in descending order. The `ascending=False` argument in the `sort_values` function ensures that the sorting is done in descending order.
2023-06-29 19:05:16 -07:00
Paul Gauthier
937ee478ad show with imgcat 2023-06-29 19:04:48 -07:00
Paul Gauthier
0f6a90bfed aider: Switched the plt stuff to use an explicit fig.
# Context:
USER: switch the plt stuff to use an explicit fig
ASSISTANT: To switch the matplotlib plotting to use an explicit figure, we need to modify the `show_stats` function in the `benchmark/benchmark.py` file.

Here are the changes:

```python
benchmark/benchmark.py
<<<<<<< ORIGINAL
    df_grouped.unstack().plot(kind="barh", figsize=(10, 6))

    plt.xlabel("Pass Rate 1")
    plt.ylabel("Model")
    plt.title("Pass Rate 1 for each Model/Edit Format")
    plt.legend(title="Edit Format")
    plt.show()
=======
    fig, ax = plt.subplots(figsize=(10, 6))
    df_grouped.unstack().plot(kind="barh", ax=ax)

    ax.set_xlabel("Pass Rate 1")
    ax.set_ylabel("Model")
    ax.set_title("Pass Rate 1 for each Model/Edit Format")
    ax.legend(title="Edit Format")
    plt.show()
>>>>>>> UPDATED
```

This change creates a new figure and axes before plotting, and then uses the axes for setting labels, title, and legend. This is a more explicit way of handling figures and axes in matplotlib.
2023-06-29 18:58:50 -07:00
Paul Gauthier
e075fe9f0d hello, graph 2023-06-29 18:58:21 -07:00
Paul Gauthier
c7ba0a5dba aider: Modified show_stats function to plot a bar graph with the average of "pass_rate_1" for each "edit_format" within each model, grouping the bars for each model together.
# Context:
USER: don't combine the edit formats. plot a different bar for each model/edit_format combo. But group the bars for each model together.
ASSISTANT: To implement this change, we need to modify the `show_stats` function in the `benchmark/benchmark.py` file. We will use the pandas and matplotlib libraries to create the bar plot.

Here are the steps:

1. In the `show_stats` function, after creating the DataFrame `df`, sort it based on "model" and "edit_format".
2. Group the DataFrame by "model" and "edit_format" and plot a bar graph for "pass_rate_1".

Here are the changes:

```python
benchmark/benchmark.py
<<<<<<< ORIGINAL
def show_stats(dirnames):
    rows = []
    for dirname in dirnames:
        row = summarize_results(dirname)
        rows.append(vars(row))

    df = pd.DataFrame.from_records(rows)
    df.sort_values(by=["model", "edit_format"], inplace=True)

    df_grouped = df.groupby("model")["pass_rate_1"].mean()
    df_grouped.plot(kind='barh', figsize=(10, 6))

    plt.xlabel('Pass Rate 1')
    plt.ylabel('Model')
    plt.title('Pass Rate 1 for each Model/Edit Format')
    plt.show()

    df.to_csv("tmp.benchmark.csv")
=======
def show_stats(dirnames):
    rows = []
    for dirname in dirnames:
        row = summarize_results(dirname)
        rows.append(vars(row))

    df = pd.DataFrame.from_records(rows)
    df.sort_values(by=["model", "edit_format"], inplace=True)

    df_grouped = df.groupby(["model", "edit_format"])["pass_rate_1"].mean()
    df_grouped.unstack().plot(kind='barh', figsize=(10, 6))

    plt.xlabel('Pass Rate 1')
    plt.ylabel('Model')
    plt.title('Pass Rate 1 for each Model/Edit Format')
    plt.legend(title='Edit Format')
    plt.show()

    df.to_csv("tmp.benchmark.csv")
>>>>>>> UPDATED
```

This will create a bar graph with the average of "pass_rate_1" for each "edit_format" within each model. The bars for each model are grouped together.
2023-06-29 18:52:08 -07:00
Paul Gauthier
d5921871f7 aider: Sort DataFrame by "model" and "edit_format" and plot a horizontal bar graph of the average "pass_rate_1" for each model.
# Context:
USER: in `show_stats` plot a horizontal bar graph. sort on "model" and "edit_format". group the bars by model. plot the pass_rate_1 for each model/edit_format.
ASSISTANT: To implement this change, we need to modify the `show_stats` function in the `benchmark/benchmark.py` file. We will use the pandas and matplotlib libraries to create the bar plot.

Here are the steps:

1. Import the matplotlib library at the top of the file.
2. In the `show_stats` function, after creating the DataFrame `df`, sort it based on "model" and "edit_format".
3. Group the DataFrame by "model" and plot a bar graph for "pass_rate_1".

Here are the changes:

```python
benchmark/benchmark.py
<<<<<<< ORIGINAL
import pandas as pd
=======
import pandas as pd
import matplotlib.pyplot as plt
>>>>>>> UPDATED
```

```python
benchmark/benchmark.py
<<<<<<< ORIGINAL
def show_stats(dirnames):
    rows = []
    for dirname in dirnames:
        row = summarize_results(dirname)
        rows.append(vars(row))

    df = pd.DataFrame.from_records(rows)

    print(df)

    df.to_csv("tmp.benchmark.csv")
=======
def show_stats(dirnames):
    rows = []
    for dirname in dirnames:
        row = summarize_results(dirname)
        rows.append(vars(row))

    df = pd.DataFrame.from_records(rows)
    df.sort_values(by=["model", "edit_format"], inplace=True)

    df_grouped = df.groupby("model")["pass_rate_1"].mean()
    df_grouped.plot(kind='barh', figsize=(10, 6))

    plt.xlabel('Pass Rate 1')
    plt.ylabel('Model')
    plt.title('Pass Rate 1 for each Model/Edit Format')
    plt.show()

    df.to_csv("tmp.benchmark.csv")
>>>>>>> UPDATED
```

Please note that this will create a bar graph with the average of "pass_rate_1" for each model. If you want to plot "pass_rate_1" for each "edit_format" within each model, we would need to modify the grouping and plotting code.
2023-06-29 18:50:59 -07:00
Paul Gauthier
fe0aed2420 pull summary data into a df 2023-06-29 18:48:20 -07:00