Skip to content

fix(runner): accept a single callable aggregator - #233

Merged
helloml0326 merged 1 commit into
agentscope-ai:mainfrom
Elon-Jiang:fix/runner-single-aggregator-20261111
Nov 12, 2026
Merged

helloml0326 merged 1 commit into
agentscope-ai:mainfrom
Elon-Jiang:fix/runner-single-aggregator-20261111

Conversation

@Elon-Jiang

Copy link
Copy Markdown
Contributor

OpenJudge Version

0.2.5, baseline 6d69c4637be8683f4564481f8c29ac7e549631eb.

Description

Passing a function as GradingRunner(..., aggregators=combine) is accepted by the constructor's declared type, but arun() raises TypeError: 'function' object is not iterable after executing the graders. arun_multiple_datasets() fails the same way. Passing [combine] works.

Normalize a single callable to a one-element list, as already done for BaseAggregator. Add public runner regressions using FunctionGrader and document the supported function form. Existing list, built-in aggregator and no-aggregator behavior is preserved.

Validation (Python 3.12.13, macOS):

  • On unchanged baseline: the two direct-function cases fail; six list/built-in/None controls pass.
  • PYTHONPATH=. python -m pytest tests/runner tests/evaluation_strategy -q: 116 passed.
  • pre-commit run --all-files: every configured hook passed, including the repository's offline pytest selection, pylint, flake8, black/isort and package checks. Process-lifecycle tests require normal system process access; the initial restricted run could not access macOS process information, and the unrestricted run passed.

No external service, model response or grader implementation was replaced. Live provider and dataset-quality evaluation are outside the configured offline selection.

AI assistance: OpenAI Codex investigated, implemented, reviewed and ran the checks. This does not assert personal code review or testing by the account owner.

Checklist

  • Code has been formatted with pre-commit run --all-files
  • All tests in the configured pre-commit selection are passing
  • Docstrings are in Google style
  • Related documentation has been updated
  • Code is ready for review

Co-authored-by: OpenAI Codex <noreply@openai.com>
@helloml0326
helloml0326 merged commit 909eb4d into agentscope-ai:main Nov 12, 2026
1 check passed
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