Skip to content

Commit

Permalink
fix: Fixed leaderboard crash (#2221)
Browse files Browse the repository at this point in the history
* Fixed leaderboard crash

* Fixed language selection error

* Ran linting
  • Loading branch information
x-tabdeveloping authored Mar 3, 2025
1 parent 587892d commit 761a174
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions mteb/leaderboard/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
3 changes: 3 additions & 0 deletions mteb/model_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down

0 comments on commit 761a174

Please sign in to comment.