From 761a17451bdc6cbe5baeca0ccffe38db9f9a1696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Kardos?= Date: Mon, 3 Mar 2025 10:05:49 +0100 Subject: [PATCH] fix: Fixed leaderboard crash (#2221) * Fixed leaderboard crash * Fixed language selection error * Ran linting --- mteb/leaderboard/app.py | 1 + mteb/model_meta.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/mteb/leaderboard/app.py b/mteb/leaderboard/app.py index 7c686a06a9..02e9ff500c 100644 --- a/mteb/leaderboard/app.py +++ b/mteb/leaderboard/app.py @@ -228,6 +228,7 @@ def filter_models( lang_select = gr.Dropdown( ISO_TO_LANGUAGE, value=sorted(default_results.languages), + allow_custom_value=True, multiselect=True, label="Language", info="Select languages to include.", diff --git a/mteb/model_meta.py b/mteb/model_meta.py index 8c5e5dc744..aa66778824 100644 --- a/mteb/model_meta.py +++ b/mteb/model_meta.py @@ -152,6 +152,9 @@ def is_zero_shot_on(self, tasks: Sequence[AbsTask] | Sequence[str]) -> bool | No zero-shot or not on the given tasks. Returns None if no training data is specified on the model. """ + # If no tasks were specified, we're obviously zero-shot + if not tasks: + return True if self.training_datasets is None: return None model_datasets = {ds_name for ds_name, splits in self.training_datasets.items()}