Skip to content

Commit 1221320

Browse files
authored
[Refactor] Refactorize openicl eval task (open-compass#1990)
* [Refactor] Refactorize openicl eval task * update
1 parent 6ac9b06 commit 1221320

File tree

16 files changed

+197
-1094
lines changed

16 files changed

+197
-1094
lines changed

opencompass/openicl/icl_evaluator/icl_base_evaluator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def evaluate(
9191
):
9292
# Check if predictions and references have the
9393
# same length if both are provided
94-
if 'predictions' in score_kwargs and 'references' in score_kwargs:
94+
if ('predictions' in score_kwargs and 'references' in score_kwargs
95+
and score_kwargs['references'] is not None):
9596
if len(score_kwargs['predictions']) != len(
9697
score_kwargs['references']):
9798
raise ValueError(

opencompass/tasks/openicl_eval.py

Lines changed: 195 additions & 218 deletions
Large diffs are not rendered by default.

opencompass/utils/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
from .lark import * # noqa
1111
from .logging import * # noqa
1212
from .menu import * # noqa
13-
from .model_postprocessors import * # noqa
1413
from .network import * # noqa
15-
from .postprocessors import * # noqa
1614
from .prompt import * # noqa
1715
from .result_station import * # noqa
1816
from .text_postprocessors import * # noqa

opencompass/utils/model_postprocessors.py

Lines changed: 0 additions & 135 deletions
This file was deleted.

opencompass/utils/postprocessors/__init__.py

Whitespace-only changes.

opencompass/utils/postprocessors/naive/PROMPT_TEMPLATE.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

opencompass/utils/postprocessors/naive/README.md

Lines changed: 0 additions & 71 deletions
This file was deleted.

opencompass/utils/postprocessors/naive/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

opencompass/utils/postprocessors/naive/extractor.py

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)