计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
evaluation【效率与协作】Evaluate Unstructured partition outputs against gold outputs for text extraction, element types, table structure, and optional object detection metrics.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a user needs to compare existing Unstructured outputs with gold-standard outputs, interpret metric TSVs, or decide whether optional object-detection evaluation is appropriate.
metadata.category_depth effects.Table elements, metadata.text_as_html, or metadata.table_as_cells.torch and layout dump JSON files are available.unstructured.metrics.evaluate can pull the torch-backed object detection module.Table elements with table metadata or Deckerd-style cell data.scripts/evaluate_elements_pair.py for a dependency-light summary.references/metrics-reference.md.references/troubleshooting.md before changing the partitioning pipeline.python sub-skills/evaluation/scripts/evaluate_elements_pair.py \
--prediction predicted.json \
--gold gold.json \
--table-source auto
The helper reports element count differences, text accuracy, missing text, element-type frequency match, and table structure metrics when compatible table data exists. It intentionally avoids importing unstructured.metrics.evaluate so ordinary text/element/table checks do not require torch.
For package-level TSV outputs, instantiate the metric calculator, pass prediction and gold directories, and write to an output directory outside the runtime skill tree:
from unstructured.metrics.evaluate import TextExtractionMetricsCalculator
TextExtractionMetricsCalculator("predictions", "gold", document_type="json").calculate(
export_dir="metrics",
visualize_progress=False,
display_agg_df=False,
)
Use the detailed calculator table and output filenames in references/metrics-reference.md.