Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion mteb/benchmarks/_create_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ def _create_per_language_table_from_benchmark_results(

def _create_summary_table_mean_public_private(
benchmark_results: BenchmarkResults,
exclude_private_from_borda: bool = False,
) -> pd.DataFrame:
"""Create summary table from BenchmarkResults.

Expand All @@ -311,6 +312,7 @@ def _create_summary_table_mean_public_private(

Args:
benchmark_results: BenchmarkResults object containing model results
exclude_private_from_borda: If True, calculate Borda rank using only public tasks

Returns:
DataFrame with model summaries, ready for styling in the leaderboard
Expand Down Expand Up @@ -356,7 +358,11 @@ def _create_summary_table_mean_public_private(
joint_table = joint_table.drop(models_to_remove, axis=0)
joint_table.insert(0, "mean(public)", public_mean)
joint_table.insert(1, "mean(private)", private_mean)
joint_table["borda_rank"] = _get_borda_rank(per_task)
if exclude_private_from_borda:
borda_per_task = per_task[public_task_name]
else:
borda_per_task = per_task
joint_table["borda_rank"] = _get_borda_rank(borda_per_task)
joint_table = joint_table.sort_values("borda_rank", ascending=True)
joint_table = joint_table.reset_index()

Expand Down
4 changes: 3 additions & 1 deletion mteb/benchmarks/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def _create_summary_table(
_create_summary_table_mean_public_private,
)

joint_table = _create_summary_table_mean_public_private(benchmark_results)
joint_table = _create_summary_table_mean_public_private(
benchmark_results, exclude_private_from_borda=True
)
# issue 3902: temporary remove the private column from RTEB summary table
if "Mean (Private)" in joint_table.columns:
joint_table = joint_table.drop(columns=["Mean (Private)"])
Expand Down