fix: to instr_type

This commit is contained in:
Ting-Jun Wang 2025-01-12 14:32:43 +08:00
parent d00b84432e
commit 7e5abbca0e
Signed by: snsd0805
GPG Key ID: 48D331A3D6160354

View File

@ -11,7 +11,7 @@ def dump_json(data, filename):
json.dump(data, fp) json.dump(data, fp)
for f in os.listdir(): for f in os.listdir():
if 'navgpt' in f: if 'unseen' in f:
print(f) print(f)
data = load_json(f) data = load_json(f)
@ -21,7 +21,12 @@ for f in os.listdir():
new_i = i.copy() new_i = i.copy()
new_i['instruction'] = instr new_i['instruction'] = instr
# new_i['instr_id'] = f'{new_i["id"]}_{index}' # new_i['instr_id'] = f'{new_i["id"]}_{index}'
new_i['new_reverie_id'] = f'{new_i["new_reverie_id"]}_{index}' new_i['new_reverie_id'] = f'{new_i["id"]}_{index}'
new_i['gt_found'] = i['found'][index]
new_i['target'] = i['target_objects'][index]
new_i['clip_target'] = i['clip_target'][index]
del new_i['found']
del new_i['target_objects']
del new_i['instructions'] del new_i['instructions']
new_data.append(new_i) new_data.append(new_i)