File size: 398 Bytes
0c51b93 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import json
with open('../data/sotopia_pi_bc_episodes_reward_goal_progress_gpt-4o.json', 'r') as f:
data = json.load(f)
cleaned_data = []
for i, example in enumerate(data):
if example['value'] == 0:
continue
cleaned_data.append(example)
with open('../data/sotopia_pi_bc_episodes_reward_goal_progress_gpt-4o_cleaned.json', 'w') as f:
json.dump(cleaned_data, f, indent=2)
|