Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Ingestion guide's AWS Textract recipe reads only the first GetDocumentTextDetection page and never checks JobStatus, silently truncating multi-page OCR text (F-W1-DOCS-TRAIN-13)

未关闭 适合新手
#883 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
aws, shell

调研方向

示例位于 docs/guides/ingestion.md 第 634-650 行,其中唯一的 get_document_text_detection 调用在第 644 行附近;土耳其语镜像版本位于 docs/guides/ingestion-tr.md 第 652-668 行。先阅读第 2 步中的 start-document-text-detection 调用,看 JobId 应在哪里获取。完成标准是:代码片段获取 JOB_ID,等待 JobStatus,遍历 NextToken 按顺序写出每个 LINE 块,并且两种语言版本保持一致。

由索引模型根据 Issue 内容生成。

描述

documentation severity: medium source: review-2026-09 wave: 3

Wave 3 · group W3 Docs · highest severity Medium · 1 finding(s) · effort docs fix

Summary

The OCR recipe makes one get_document_text_detection call, writes the LINE blocks it returns and runs forgelm ingest on the result. Textract returns at most 1,000 blocks per call — PAGE, LINE and WORD blocks all count — plus a NextToken for the rest, so a typical multi-page scan is cut short with no error and the truncated text becomes training data.

Primary finding

F-W1-DOCS-TRAIN-13 — The Textract recipe silently truncates paginated OCR output

severity Medium · confidence high · checked against the AWS API reference

What happens. docs/guides/ingestion.md:634-650 (Turkish mirror docs/guides/ingestion-tr.md:652-668); the single call is at EN :644 / TR :662. The snippet never follows NextToken and never checks JobStatus, so a job that is still IN_PROGRESS, FAILED or only a PARTIAL_SUCCESS looks the same as a finished one. It also uses $JOB_ID without showing where it comes from: the start-document-text-detection call in step 2 does not capture the returned JobId.

Where.

Evidence (re-verified on 2026-10-09).

  • AWS Textract API reference, GetDocumentTextDetection: results are paginated; when a response includes NextToken, call the operation again with it to get the next set; MaxResults defaults to 1,000 (https://docs.aws.amazon.com/textract/latest/APIReference/API_GetDocumentTextDetection.html).
  • The source review ran the embedded snippet against a two-page stub client: it made one call, printed only the first page and exited normally.
  • Both guide pages are unchanged on development.

Recommended fix. Capture the job id (JOB_ID=$(aws textract start-document-text-detection … --query JobId --output text)), wait until JobStatus is no longer IN_PROGRESS (or point to AWS's polling / SNS pattern), stop with an error on FAILED, print a warning on PARTIAL_SUCCESS, and loop over NextToken so every page's LINE blocks are written in order before forgelm ingest runs.

Acceptance criteria

  • The recipe follows NextToken until it is absent and writes every LINE block in order.
  • A failed or still-running job stops the recipe before forgelm ingest; a partial success is reported.
  • The snippet shows where JOB_ID comes from.
  • Documentation listed above is corrected in English and in its Turkish mirror in the same PR.
  • The finding is resolved or explicitly closed with a reason.

Found by the September 2026 independent review of ForgeLM against commit cab2947 and re-verified against development at f94595f on 2026-10-09. Code links point at cab2947; line numbers may have moved since. Finding IDs (F-W1-…) are stable references for this backlog.

主要语言
Python
星标
9
派生
1
平均合并
8 小时 10 分钟
30 天内合并 PR
5

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HodeTech/ForgeLM 的其他 Issue

查看 HodeTech/ForgeLM 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。