diff --git a/llm_server/database.py b/llm_server/database.py index d5143ca..214d618 100644 --- a/llm_server/database.py +++ b/llm_server/database.py @@ -135,14 +135,14 @@ def average_column_for_model(table_name, column_name, model_name): def weighted_average_column_for_model(table_name, column_name, model_name, backend_name, exclude_zeros: bool = False): conn = sqlite3.connect(opts.database_path) cursor = conn.cursor() - cursor.execute(f"SELECT DISTINCT model, backend FROM {table_name}") + cursor.execute(f"SELECT DISTINCT model, backend_mode FROM {table_name}") models_backends = [(row[0], row[1]) for row in cursor.fetchall()] model_averages = {} for model, backend in models_backends: if backend != backend_name: continue - cursor.execute(f"SELECT {column_name}, ROWID FROM {table_name} WHERE model = ? AND backend = ? ORDER BY ROWID DESC", (model, backend)) + cursor.execute(f"SELECT {column_name}, ROWID FROM {table_name} WHERE model = ? AND backend_mode = ? ORDER BY ROWID DESC", (model, backend)) results = cursor.fetchall() if not results: