From 5ce8e0450e878fe96fa29ca734db63b67d1e1bb3 Mon Sep 17 00:00:00 2001 From: Fengzhe Zhou Date: Wed, 28 Feb 2024 10:53:40 +0800 Subject: [PATCH] [Fix] Fix type hint in IFEval (#915) --- opencompass/datasets/IFEval/evaluation_main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opencompass/datasets/IFEval/evaluation_main.py b/opencompass/datasets/IFEval/evaluation_main.py index de17cbe1..ab978118 100644 --- a/opencompass/datasets/IFEval/evaluation_main.py +++ b/opencompass/datasets/IFEval/evaluation_main.py @@ -16,7 +16,7 @@ # limitations under the License. import dataclasses -from typing import Dict, Optional, Union +from typing import Dict, List, Optional, Union from absl import flags @@ -43,18 +43,18 @@ _OUTPUT_DIR = flags.DEFINE_string( @dataclasses.dataclass class InputExample: key: int - instruction_id_list: list[str] + instruction_id_list: List[str] prompt: str - kwargs: list[Dict[str, Optional[Union[str, int]]]] + kwargs: List[Dict[str, Optional[Union[str, int]]]] @dataclasses.dataclass class OutputExample: - instruction_id_list: list[str] + instruction_id_list: List[str] prompt: str response: str follow_all_instructions: bool - follow_instruction_list: list[bool] + follow_instruction_list: List[bool] def test_instruction_following_strict(