Skip to content

Commit

Permalink
fix the docstring and unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
ninghu committed Sep 5, 2024
1 parent d475f15 commit 38ef087
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class RougeScoreEvaluator:
.. code-block:: python
{
"rouge_precision": 1.0,
"rouge_recall": 1.0,
"rouge_f1_score": 1.0
}
{
"rouge_precision": 1.0,
"rouge_recall": 1.0,
"rouge_f1_score": 1.0
}
"""

def __init__(self, rouge_type: RougeType):
Expand Down
3 changes: 2 additions & 1 deletion src/promptflow-evals/tests/evals/unittests/test_save_eval.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import inspect
import os
import pathlib
from enum import Enum
from typing import Any, List, Optional, Type

import pytest
Expand All @@ -17,7 +18,7 @@ def data_file():
def get_evaluators_from_module(namespace: Any, exceptions: Optional[List[str]] = None) -> List[Type]:
evaluators = []
for name, obj in inspect.getmembers(namespace):
if inspect.isclass(obj):
if inspect.isclass(obj) and not issubclass(obj, Enum):
if exceptions and name in exceptions:
continue
evaluators.append(obj)
Expand Down

0 comments on commit 38ef087

Please sign in to comment.