fix(qa): preserve final CSV pair row number (#16433)

This commit is contained in:
Harsh Kashyap
2026-07-01 12:22:08 +05:30
committed by GitHub
parent b42414b64a
commit b8e960e6c8
2 changed files with 55 additions and 1 deletions

View File

@@ -395,7 +395,7 @@ def chunk(filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, lang=
f"{len(fails)} failure, line: %s..." % (",".join(fails[:3])) if fails else "")))
if question:
res.append(beAdoc(deepcopy(doc), question, answer, eng, len(list(reader))))
res.append(beAdoc(deepcopy(doc), question, answer, eng, len(lines)))
callback(0.6, ("Extract Q&A: {}".format(len(res)) + (
f"{len(fails)} failure, line: %s..." % (",".join(fails[:3])) if fails else "")))