Einstein-v6.1-Llama3-8B / data /remove_empty_output.py
Weyaxi's picture
add data trained to make this model
4413631 verified
raw
history blame contribute delete
No virus
284 Bytes
import json
with open('merged_all.json', 'r') as file:
data = json.load(file)
print(f"Normal len: {len(data)}")
data = [row for row in data if row["output"] != ""]
print(f"After len: {len(data)}")
with open('merged_all.json', 'w') as file:
json.dump(data, file, indent=1)