Skip to content

remove batch pending from fieldresult#64

Merged
yaruwangway merged 1 commit into
mainfrom
refactor-fieldresult
May 4, 2026
Merged

remove batch pending from fieldresult#64
yaruwangway merged 1 commit into
mainfrom
refactor-fieldresult

Conversation

@yaruwangway
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the pending_batch attribute from FieldResult and standardizes batch-comparator deferral on status="pending" (using the existing comparator field to identify the batch handler), simplifying the result model used throughout struct_extract_eval.

Changes:

  • Removed FieldResult.pending_batch and updated scoring to mark batch-comparator placeholders via status="pending".
  • Updated process_batches to find pending fields by status and group them by FieldResult.comparator.
  • Updated/adjusted batch-related tests and evaluator docstrings to reflect the new pending semantics.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/test_batch.py Updates batch dispatch tests to construct pending placeholders without pending_batch.
src/struct_extract_eval/evaluator.py Docstring update to describe pending resolution via status="pending".
src/struct_extract_eval/core/scoring.py Removes pending_batch from FieldResult and updates batch-deferral behavior/docs.
src/struct_extract_eval/batch/process.py Switches dispatch grouping from pending_batch to status="pending" + comparator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/struct_extract_eval/core/scoring.py
Comment on lines 603 to 607
if is_batch(comparator_fn):
# Defer: build a provisional FieldResult, mark pending. process_batches
# will dispatch this to the registered batch handler later.
# The comparator name identifies which batch handler to use.
return FieldResult(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

@yaruwangway yaruwangway merged commit 2080514 into main May 4, 2026
4 checks passed
@yaruwangway yaruwangway deleted the refactor-fieldresult branch May 4, 2026 18:43
Copilot stopped work on behalf of yaruwangway due to an error May 4, 2026 18:43
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