From a750bdfad054ccaeecca06f512a0fe616c27b698 Mon Sep 17 00:00:00 2001 From: Roman Solomatin <36135455+Samoed@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:42:32 +0300 Subject: [PATCH] lint --- mteb/abstasks/AbsTaskRetrieval.py | 10 ++++++++-- tests/test_TaskMetadata.py | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mteb/abstasks/AbsTaskRetrieval.py b/mteb/abstasks/AbsTaskRetrieval.py index 3e48e2998..6a40761b1 100644 --- a/mteb/abstasks/AbsTaskRetrieval.py +++ b/mteb/abstasks/AbsTaskRetrieval.py @@ -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] @@ -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)) diff --git a/tests/test_TaskMetadata.py b/tests/test_TaskMetadata.py index 40acaca43..33f65dbab 100644 --- a/tests/test_TaskMetadata.py +++ b/tests/test_TaskMetadata.py @@ -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",