Update OpenOrca.py

This commit is contained in:
Alignment Lab AI 2023-06-30 00:23:59 +00:00 committed by huggingface-web
parent 001bacb0bf
commit cca6aa5db4

@ -73,14 +73,4 @@ class CustomDataset(DatasetBuilder):
'system_prompt': data['system_prompt'],
'question': data['question'],
'response': data['response']
}
def _generate_examples(self, filepath):
with open(filepath, 'r', encoding='utf-8') as f:
for id_, line in enumerate(f):
data = json.loads(line.strip())
yield id_, {
'id': data.get('id', ''),
'system_prompt': data.get('system_prompt', ''),
'question': data.get('question', ''),
'response': data.get('response', '')
}
}