Skip to content

Commit

Permalink
fixed type error
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekToma committed Feb 22, 2024
1 parent cbb04bf commit e853c8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pv211_utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit e853c8b

Please sign in to comment.