Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor typing improvements #953

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deepeval/evaluate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from copy import deepcopy
import os
from typing import List, Optional, Union, Dict
from typing import List, Optional, Union, Dict, Sequence
import time
from dataclasses import dataclass

Expand Down Expand Up @@ -539,7 +539,7 @@ def assert_test(


def evaluate(
test_cases: List[Union[LLMTestCase, ConversationalTestCase]],
test_cases: Sequence[Union[LLMTestCase, ConversationalTestCase]],
metrics: List[BaseMetric],
hyperparameters: Optional[Dict[str, Union[str, int, float]]] = None,
run_async: bool = True,
Expand Down
2 changes: 1 addition & 1 deletion deepeval/scorer/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def bert_score(
predictions: Union[str, List[str]],
model: Optional[str] = "microsoft/deberta-large-mnli",
lang: Optional[str] = "en",
) -> float:
) -> dict[str, np.ndarray]:
"""
Calculate BERTScore for one or more reference sentences compared to one or more prediction sentences using a specified BERT model.

Expand Down
Loading