From e853c8bc40c70272844f4491ed3831c89a253d22 Mon Sep 17 00:00:00 2001 From: MarekToma Date: Thu, 22 Feb 2024 08:58:22 +0100 Subject: [PATCH] fixed type error --- pv211_utils/datasets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pv211_utils/datasets.py b/pv211_utils/datasets.py index 300ba06..614c9f3 100644 --- a/pv211_utils/datasets.py +++ b/pv211_utils/datasets.py @@ -201,7 +201,7 @@ def load_train_queries(self, query_class=ArqmathQueryBase) -> OrderedDict: OrderedDict Dictionary of test queries in (query_id: Query) form. """ - year1, year2 = {2020, 2021, 2022} - {self.year} + year1, year2 = list({2020, 2021, 2022} - {self.year}) return OrderedDict( self._get_split(year1, Split.train, query_class), @@ -217,7 +217,7 @@ def load_validation_queries(self, query_class=ArqmathQueryBase) -> OrderedDict: OrderedDict Dictionary of test queries in (query_id: Query) form. """ - year1, year2 = {2020, 2021, 2022} - {self.year} + year1, year2 = list({2020, 2021, 2022} - {self.year}) return OrderedDict( self._get_split(year1, Split.validation, query_class), @@ -243,7 +243,7 @@ def load_train_judgements(self) -> ArqmathJudgements: Set of (Query, Answer) pairs, where Anwser is judged as relevant to the Query. """ - year1, year2 = {2020, 2021, 2022} - {self.year} + year1, year2 = list({2020, 2021, 2022} - {self.year}) return {(q, a) for q, a in self._load_judgements(year1).union( self._load_judgements(year2)) @@ -258,7 +258,7 @@ def load_validation_judgements(self) -> ArqmathJudgements: Set of (Query, Answer) pairs, where Anwser is judged as relevant to the Query. """ - year1, year2 = {2020, 2021, 2022} - {self.year} + year1, year2 = list({2020, 2021, 2022} - {self.year}) return {(q, a) for q, a in self._load_judgements(year1).union( self._load_judgements(year2))