diff --git a/opencompass/datasets/IFEval/evaluation_main.py b/opencompass/datasets/IFEval/evaluation_main.py index de17cbe1d..ab9781181 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 @@ @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(