Skip to content

Commit

Permalink
Merge branch 'add_steerlm_links' of github.com:NVIDIA/NeMo-Aligner in…
Browse files Browse the repository at this point in the history
…to steerlm_update
  • Loading branch information
HeyyyyyyG committed Dec 2, 2023
2 parents 564ae7e + 68d75ff commit 7640597
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/nlp/data/steerlm/preprocess_openassistant_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ def get_data_records(objs, mask_role, type):
if len(conversations) <= 1:
# remove single turn conversations
continue

# mask out labels from user turns
updated_conversation = []
for turn in conversations:
if turn["from"] == "User":
turn["label"] = None
updated_conversation.append(turn)

conversation_obj = {
"conversations": conversations,
"conversations": updated_conversation,
"system": system_prompt,
"mask": mask_role,
"type": type,
Expand Down

0 comments on commit 7640597

Please sign in to comment.