Skip to content

fix(metrics): correct error messages and export_name docstring in get_mean_grouping - #4475

Open
simpleqt wants to merge 2 commits into
Unstructured-IO:mainfrom
simpleqt:fix/metrics-messages
Open

fix(metrics): correct error messages and export_name docstring in get_mean_grouping#4475
simpleqt wants to merge 2 commits into
Unstructured-IO:mainfrom
simpleqt:fix/metrics-messages

Conversation

@simpleqt

@simpleqt simpleqt commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Message/docstring corrections in unstructured/metrics/evaluate.py, each verified against the code:

  1. "Invalid grouping category. Returning a non-group evaluation." — the code raises; it does not return.
  2. The unknown-metric message listed table_extraction as valid while the accepted branches are text_extraction, element_type and object_detection (table_extraction is rejected); added the missing object_detection.
  3. The ".csv or .tsv" messages (3 sites) omitted .txt, which the preceding line accepts; updated to ".csv, .tsv or .txt".
  4. The docstring documented export_name; the parameter is export_filename (following it raised TypeError). Summary reference updated too.

Checklist

  • Existing tests assert only pytest.raises(ValueError), no message matching
  • Conventional Commit title

Review in cubic

setup.py was deleted in the uv migration (69770c6); the License
section still instructed contributors to copy a license header from a
link to that file. Point at source-file headers / pyproject.toml
instead.
…_mean_grouping

- 'Invalid grouping category. Returning a non-group evaluation.' said
  it returns while the code raises
- the unknown-metric message listed table_extraction as valid and
  omitted the actually-supported object_detection
- '.csv or .tsv' messages omitted .txt which the preceding line
  accepts (3 sites)
- the docstring documented export_name; the parameter is
  export_filename (following it raised TypeError)
Copilot AI lite review requested due to automatic review settings September 5, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants