Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Samoed committed Nov 21, 2024
1 parent e8b34c6 commit a750bdf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions mteb/abstasks/AbsTaskRetrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ def _calculate_metrics_from_split(
instructions = None
if hf_subset and hf_subset in self.queries:
# Bright retrieval have different have different splits for diffrent subsets for corpus
if self.corpus.get(hf_subset, None) is None or self.corpus[hf_subset].get(split, None) is None:
if (
self.corpus.get(hf_subset, None) is None
or self.corpus[hf_subset].get(split, None) is None
):
return {}

queries = self.queries[hf_subset][split]
Expand All @@ -398,7 +401,10 @@ def _calculate_metrics_from_split(
top_ranked = {}
for hf_subset in self.metadata.eval_langs:
# Bright retrieval have different have different splits for diffrent subsets for corpus
if self.corpus.get(hf_subset, None) is None or self.corpus[hf_subset].get(split, None) is None:
if (
self.corpus.get(hf_subset, None) is None
or self.corpus[hf_subset].get(split, None) is None
):
continue
queries.update(process_docs(self.queries, hf_subset, split))
corpus.update(process_docs(self.corpus, hf_subset, split))
Expand Down
1 change: 0 additions & 1 deletion tests/test_TaskMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ def test_empty_descriptive_stat_in_new_datasets(task: AbsTask):
# THIS IS ONLY INTENDED FOR HISTORIC DATASETS
exceptions = [
"MSMARCOv2",
"BrightRetrieval",
"NeuCLIR2022Retrieval",
"NeuCLIR2023Retrieval",
"BibleNLPBitextMining",
Expand Down

0 comments on commit a750bdf

Please sign in to comment.