Skip to content

Commit f20fdb4

Browse files
authored
API review comments fix for release 1.4.0 (Azure#40249)
1 parent 6495ca4 commit f20fdb4

File tree

20 files changed

+25
-30
lines changed

20 files changed

+25
-30
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_bleu/_bleu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class BleuScoreEvaluator(EvaluatorBase):
4747
id = "azureml://registries/azureml/models/Bleu-Score-Evaluator/versions/3"
4848
"""Evaluator identifier, experimental and to be used only with evaluation in cloud."""
4949

50-
def __init__(self, threshold=0.5):
50+
def __init__(self, *, threshold=0.5):
5151
self._threshold = threshold
5252
self._higher_is_better = True
5353
super().__init__(threshold=threshold, _higher_is_better=self._higher_is_better)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_coherence/_coherence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class CoherenceEvaluator(PromptyEvaluatorBase[Union[str, float]]):
5656
"""Evaluator identifier, experimental and to be used only with evaluation in cloud."""
5757

5858
@override
59-
def __init__(self, model_config, threshold=3):
59+
def __init__(self, model_config, *, threshold=3):
6060
current_dir = os.path.dirname(__file__)
6161
prompty_path = os.path.join(current_dir, self._PROMPTY_FILE)
6262
self._threshold = threshold

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_content_safety/_hate_unfairness.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def __init__(
7878
self,
7979
credential,
8080
azure_ai_project,
81+
*,
8182
threshold: int = 3,
8283
):
8384
super().__init__(

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_content_safety/_self_harm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def __init__(
7272
self,
7373
credential,
7474
azure_ai_project,
75+
*,
7576
threshold: int = 3,
7677
):
7778
super().__init__(

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_content_safety/_sexual.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def __init__(
7474
self,
7575
credential,
7676
azure_ai_project,
77+
*,
7778
threshold: int = 3,
7879
):
7980
super().__init__(

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_content_safety/_violence.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def __init__(
7474
self,
7575
credential,
7676
azure_ai_project,
77+
*,
7778
threshold: int = 3,
7879
):
7980
super().__init__(

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_f1_score/_f1_score.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class F1ScoreEvaluator(EvaluatorBase):
5151
id = "azureml://registries/azureml/models/F1Score-Evaluator/versions/3"
5252
"""Evaluator identifier, experimental and to be used only with evaluation in cloud."""
5353

54-
def __init__(self, threshold=0.5):
54+
def __init__(self, *, threshold=0.5):
5555
self._threshold = threshold
5656
self._higher_is_better = True
5757
super().__init__(threshold=threshold, _higher_is_better=self._higher_is_better)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_fluency/_fluency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class FluencyEvaluator(PromptyEvaluatorBase[Union[str, float]]):
5858
"""Evaluator identifier, experimental and to be used only with evaluation in cloud."""
5959

6060
@override
61-
def __init__(self, model_config, threshold=3):
61+
def __init__(self, model_config, *, threshold=3):
6262
current_dir = os.path.dirname(__file__)
6363
prompty_path = os.path.join(current_dir, self._PROMPTY_FILE)
6464
self._threshold = threshold

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_gleu/_gleu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GleuScoreEvaluator(EvaluatorBase):
4949
"""Evaluator identifier, experimental and to be used only with evaluation in cloud."""
5050

5151
@override
52-
def __init__(self, threshold=0.5):
52+
def __init__(self, *, threshold=0.5):
5353
self._threshold = threshold
5454
self._higher_is_better = True
5555
super().__init__(threshold=threshold, _higher_is_better=self._higher_is_better)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class GroundednessEvaluator(PromptyEvaluatorBase[Union[str, float]]):
6969
"""Evaluator identifier, experimental and to be used only with evaluation in cloud."""
7070

7171
@override
72-
def __init__(self, model_config, threshold=3, **kwargs):
72+
def __init__(self, model_config, *, threshold=3, **kwargs):
7373
current_dir = os.path.dirname(__file__)
7474
prompty_path = os.path.join(current_dir, self._PROMPTY_FILE_NO_QUERY) # Default to no query
7575

0 commit comments

Comments
 (0)