Skip to content

Commit

Permalink
[Bug] fix openai_map_fn bugs (#885)
Browse files Browse the repository at this point in the history
fix openai_map_fn bugs
  • Loading branch information
HIT-cwh authored Aug 9, 2024
1 parent 01640b0 commit 7dd779b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xtuner/dataset/map_fns/dataset_map_fns/openai_map_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def openai_map_fn(example):
elif msg['role'] == 'user':
input += msg['content']
elif msg['role'] == 'assistant':
output_with_loss = msg.get('loss', True)
output_with_loss = msg.get('loss', 'True')
output_with_loss = str(output_with_loss)
output_with_loss = output_with_loss.lower() == 'true'
conversation.append({
'system': system,
Expand Down

0 comments on commit 7dd779b

Please sign in to comment.