Skip to content

Commit 0c51d75

Browse files
authored
fix msbench bug (#749)
1 parent e4d043f commit 0c51d75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

swift/llm/utils/dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ def _repair_agent_conversations(conversations: str,
559559

560560

561561
def _repair_ms_bench(conversations: str) -> Dict[str, str]:
562-
conversations = ast.literal_eval(conversations)
562+
if isinstance(conversations, str):
563+
conversations = ast.literal_eval(conversations)
563564
default_system = 'You are a helpful assistant.'
564565
if conversations[0]['from'] == 'system' and conversations[0][
565566
'value'] == default_system:

0 commit comments

Comments
 (0)