mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Fix] Fix type hint in IFEval (#915)
This commit is contained in:
parent
53fe788d27
commit
5ce8e0450e
@ -16,7 +16,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
from typing import Dict, Optional, Union
|
from typing import Dict, List, Optional, Union
|
||||||
|
|
||||||
from absl import flags
|
from absl import flags
|
||||||
|
|
||||||
@ -43,18 +43,18 @@ _OUTPUT_DIR = flags.DEFINE_string(
|
|||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class InputExample:
|
class InputExample:
|
||||||
key: int
|
key: int
|
||||||
instruction_id_list: list[str]
|
instruction_id_list: List[str]
|
||||||
prompt: str
|
prompt: str
|
||||||
kwargs: list[Dict[str, Optional[Union[str, int]]]]
|
kwargs: List[Dict[str, Optional[Union[str, int]]]]
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class OutputExample:
|
class OutputExample:
|
||||||
instruction_id_list: list[str]
|
instruction_id_list: List[str]
|
||||||
prompt: str
|
prompt: str
|
||||||
response: str
|
response: str
|
||||||
follow_all_instructions: bool
|
follow_all_instructions: bool
|
||||||
follow_instruction_list: list[bool]
|
follow_instruction_list: List[bool]
|
||||||
|
|
||||||
|
|
||||||
def test_instruction_following_strict(
|
def test_instruction_following_strict(
|
||||||
|
Loading…
Reference in New Issue
Block a user