Skip to content

Commit a8e900d

Browse files
author
Chibu Ukachi
committed
fix resume
1 parent 4f80f5d commit a8e900d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/response_regeneration/script.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def load_seen(path: str):
115115
obj = json.loads(line)
116116
except json.JSONDecodeError:
117117
continue
118-
key = obj.get("uuid") or obj.get("idx")
118+
# Match the actual output format: "id" field and "idx" in metadata
119+
key = obj.get("id") or obj.get("metadata", {}).get("idx")
119120
if key is not None:
120121
seen.add(str(key))
121122
return seen
@@ -296,7 +297,8 @@ async def main():
296297
continue
297298

298299
uuid = row.get("uuid")
299-
key = str(uuid or index)
300+
# Match the ID format used in output: uuid or "sample_{index}"
301+
key = str(uuid) if uuid else f"sample_{index}"
300302
if key in seen_ids:
301303
continue
302304

0 commit comments

Comments
 (0)