From 83607cc4c8e9d1e38e2a8fd10a56984818bbf066 Mon Sep 17 00:00:00 2001 From: Ilya Matiach Date: Tue, 3 Dec 2024 11:43:44 -0500 Subject: [PATCH] Update gsq component to azure-ai-evaluation sdk --- .../annotation_compute_histogram/spec.yaml | 4 +--- .../annotation_compute_metrics/spec.yaml | 4 +--- .../annotation_compute_histogram/run.py | 6 +++--- .../model_monitoring/components/tests/gsq-requirements.txt | 6 +++--- assets/model_monitoring/components/tests/requirements.txt | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/assets/model_monitoring/components/generation_safety_quality/annotation_compute_histogram/spec.yaml b/assets/model_monitoring/components/generation_safety_quality/annotation_compute_histogram/spec.yaml index c60a471733..6b1166f2ab 100644 --- a/assets/model_monitoring/components/generation_safety_quality/annotation_compute_histogram/spec.yaml +++ b/assets/model_monitoring/components/generation_safety_quality/annotation_compute_histogram/spec.yaml @@ -114,12 +114,10 @@ conf: - python=3.10 - pip: - azure-cli-core~=2.62.0 - - promptflow-evals==0.3.1 + - azure-ai-evaluation~=1.0.1 - openai~=1.11.1 - json5==0.9.11 - mltable~=1.6.1 - - promptflow[azure]~=1.13.0 - - promptflow-tools~=1.4.0 - keyrings.alt~=5.0.0 - azureml-mlflow~=1.56.0 - mlflow~=2.14.3 diff --git a/assets/model_monitoring/components/generation_safety_quality/annotation_compute_metrics/spec.yaml b/assets/model_monitoring/components/generation_safety_quality/annotation_compute_metrics/spec.yaml index 97fffcc84b..7d554f8260 100644 --- a/assets/model_monitoring/components/generation_safety_quality/annotation_compute_metrics/spec.yaml +++ b/assets/model_monitoring/components/generation_safety_quality/annotation_compute_metrics/spec.yaml @@ -70,12 +70,10 @@ conf: - python=3.10 - pip: - azure-cli-core~=2.62.0 - - promptflow-evals==0.3.1 + - azure-ai-evaluation~=1.0.1 - openai~=1.11.1 - json5==0.9.11 - mltable~=1.6.1 - - promptflow[azure]~=1.13.0 - - promptflow-tools~=1.4.0 - keyrings.alt~=5.0.0 - mlflow~=2.14.3 - azureml-fsspec~=1.3.1 diff --git a/assets/model_monitoring/components/src/generation_safety_quality/annotation_compute_histogram/run.py b/assets/model_monitoring/components/src/generation_safety_quality/annotation_compute_histogram/run.py index 20e1c16499..47e19bef2a 100644 --- a/assets/model_monitoring/components/src/generation_safety_quality/annotation_compute_histogram/run.py +++ b/assets/model_monitoring/components/src/generation_safety_quality/annotation_compute_histogram/run.py @@ -21,9 +21,9 @@ import uuid import pandas as pd -from promptflow.core import AzureOpenAIModelConfiguration -from promptflow.evals.evaluate import evaluate -from promptflow.evals.evaluators import ( +from azure.ai.evaluation._model_configurations import AzureOpenAIModelConfiguration +from azure.ai.evaluation import ( + evaluate, CoherenceEvaluator, FluencyEvaluator, GroundednessEvaluator, diff --git a/assets/model_monitoring/components/tests/gsq-requirements.txt b/assets/model_monitoring/components/tests/gsq-requirements.txt index de3556e0b6..c792cbd072 100644 --- a/assets/model_monitoring/components/tests/gsq-requirements.txt +++ b/assets/model_monitoring/components/tests/gsq-requirements.txt @@ -1,10 +1,10 @@ azure-ai-ml==1.13.0 -promptflow-evals==0.3.1 +azure-ai-evaluation~=1.0.1 azure-cli-core~=2.62.0 -azure-identity~=1.12.0 +azure-identity~=1.19.0 # apparently this is still needed for some azureml paths, see: # assets/model_monitoring/components/src/model_data_collector_preprocessor/store_url.py -azureml-core~=1.56.0 +azureml-core~=1.58.0 mlflow~=2.14.3 fsspec~=2023.4.0 azureml-fsspec==1.3.1 diff --git a/assets/model_monitoring/components/tests/requirements.txt b/assets/model_monitoring/components/tests/requirements.txt index 5e9acb848f..93d88a0126 100644 --- a/assets/model_monitoring/components/tests/requirements.txt +++ b/assets/model_monitoring/components/tests/requirements.txt @@ -1,6 +1,6 @@ azure-ai-ml==1.13.0 azure-cli-core~=2.45.0 -azure-identity~=1.12.0 +azure-identity~=1.19.0 azureml-fsspec~=1.0.0 azureml-mlflow~=1.49.0 fsspec~=2023.4.0