Skip to content

[Fix] In cascaded evaluation, the return value is None when the rule evaluation is 100% correct.#2211

Merged
tonysy merged 2 commits intoopen-compass:mainfrom
jibuzixin:cascade_bug
Sep 9, 2025
Merged

[Fix] In cascaded evaluation, the return value is None when the rule evaluation is 100% correct.#2211
tonysy merged 2 commits intoopen-compass:mainfrom
jibuzixin:cascade_bug

Conversation

@jibuzixin
Copy link
Copy Markdown
Contributor

[Fix] In cascaded evaluation, the return value is None when the rule evaluation is 100% correct.

问题描述

在使用级联评测的时候,如果规则评测的correct都是正确的(也就是100准确率),就进入不了cascade_evaluator.py文件183行的if语句,导致最后score函数返回的是None。

然后在BaseEvaluator类evaluate方法中145行results.pop('details', None)就会报错,results为空。

解决办法

多加一个else语句,保证格式统一,然后必定返回一个results。

@tonysy
Copy link
Copy Markdown
Collaborator

tonysy commented Aug 13, 2025

Thanks for your contribution, we will review this PR.

Copy link
Copy Markdown
Collaborator

@Myhs-phz Myhs-phz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@tonysy tonysy left a comment

Choose a reason for hiding this comment

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

LGTM

@tonysy tonysy merged commit 683b34a into open-compass:main Sep 9, 2025
8 checks passed
@tonysy
Copy link
Copy Markdown
Collaborator

tonysy commented Sep 9, 2025

Thanks for your contribution. @jibuzixin

zyc140345 pushed a commit to zyc140345/opencompass that referenced this pull request Oct 23, 2025
…evaluation is 100% correct. (open-compass#2211)

* [Fix] In cascaded evaluation, the return value is None when the rule evaluation is 100% correct.

* Update cascade_evaluator.py

---------

Co-authored-by: Myhs_phz <[email protected]>
iamkaia pushed a commit to iamkaia/opencompass that referenced this pull request Feb 4, 2026
…evaluation is 100% correct. (open-compass#2211)

* [Fix] In cascaded evaluation, the return value is None when the rule evaluation is 100% correct.

* Update cascade_evaluator.py

---------

Co-authored-by: Myhs_phz <[email protected]>
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.

3 participants