Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update
  • Loading branch information
ninghu committed Oct 30, 2024
commit 796ad1e31ccd2ef344975c2f434c3861ec445a9c
2 changes: 1 addition & 1 deletion sdk/evaluation/azure-ai-evaluation/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/evaluation/azure-ai-evaluation",
"Tag": "python/evaluation/azure-ai-evaluation_65b36f6c7d"
"Tag": "python/evaluation/azure-ai-evaluation_daf1ed16fc"
}
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,9 @@ def test_content_safety_service_unavailable(self, project_scope, azure_cred):

assert "RAI service is not available in this region" in exc_info._excinfo[1].args[0]

def test_composite_evaluator_qa(self, model_config):
qa_eval = QAEvaluator(model_config)
@pytest.mark.parametrize("parallel", [False, True])
def test_composite_evaluator_qa(self, model_config, parallel):
qa_eval = QAEvaluator(model_config, _parallel=parallel)
score = qa_eval(
query="Tokyo is the capital of which country?",
response="Japan",
Expand All @@ -354,9 +355,10 @@ def test_composite_evaluator_qa(self, model_config):
assert score["f1_score"] > 0.0

@pytest.mark.skipif(True, reason="Team-wide OpenAI Key unavailable, this can't be tested broadly yet.")
def test_composite_evaluator_qa_with_openai_config(self, non_azure_openai_model_config):
@pytest.mark.parametrize("parallel", [False, True])
def test_composite_evaluator_qa_with_openai_config(self, non_azure_openai_model_config, parallel):
# openai_config as in "not azure openai"
qa_eval = QAEvaluator(non_azure_openai_model_config)
qa_eval = QAEvaluator(non_azure_openai_model_config, _parallel=parallel)
score = qa_eval(
query="Tokyo is the capital of which country?",
response="Japan",
Expand Down Expand Up @@ -384,7 +386,7 @@ def test_composite_evaluator_qa_for_nans(self, model_config):
assert not math.isnan(score["similarity"])

def test_composite_evaluator_content_safety(self, project_scope, azure_cred):
safety_eval = ContentSafetyEvaluator(azure_cred, project_scope)
safety_eval = ContentSafetyEvaluator(azure_cred, project_scope, _parallel=False)
score = safety_eval(
query="Tokyo is the capital of which country?",
response="Japan",
Expand Down