mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00

# Aider chat conversation: USER: color the gpt-3.5 models a new color ASSISTANT: To color the "gpt-3.5" models a new color, we need to modify the plotting code in `benchmark/over_time.py` to check for "gpt-3.5" in the model name and assign a different color. Here are the changes: benchmark/over_time.py ```python <<<<<<< SEARCH colors = ['red' if 'gpt-4' in model else 'blue' for model in models] ======= colors = ['red' if 'gpt-4' in model else 'green' if 'gpt-3.5' in model else 'blue' for model in models] >>>>>>> REPLACE ```
34 lines
996 B
Python
34 lines
996 B
Python
import matplotlib.pyplot as plt
|
|
import yaml
|
|
from datetime import datetime
|
|
|
|
def plot_over_time(yaml_file):
|
|
with open(yaml_file, 'r') as file:
|
|
data = yaml.safe_load(file)
|
|
|
|
dates = []
|
|
pass_rates = []
|
|
models = []
|
|
|
|
for entry in data:
|
|
if 'released' in entry and 'pass_rate_2' in entry:
|
|
dates.append(entry['released'])
|
|
pass_rates.append(entry['pass_rate_2'])
|
|
models.append(entry['model'])
|
|
|
|
plt.figure(figsize=(10, 6))
|
|
colors = ['red' if 'gpt-4' in model else 'green' if 'gpt-3.5' in model else 'blue' for model in models]
|
|
plt.scatter(dates, pass_rates, c=colors, alpha=0.5)
|
|
|
|
for i, model in enumerate(models):
|
|
plt.annotate(model, (dates[i], pass_rates[i]), fontsize=8, alpha=0.75)
|
|
|
|
plt.xlabel('Release Date')
|
|
plt.ylabel('Pass Rate 2')
|
|
plt.title('Model Performance Over Time')
|
|
plt.grid(True)
|
|
plt.tight_layout()
|
|
plt.show()
|
|
|
|
# Example usage
|
|
plot_over_time('_data/edit_leaderboard.yml')
|