Azure/aistudio-copilot-sample

AttributeError: module 'azureml.metrics.constants' has no attribute 'QUESTION_ANSWERING'

jhakulin opened this issue · 1 comments

When running evaluate, there seems to be a problem that azure.ai.generative.evaluate component is not in sync with azureml.metrics.constants library.

(.venv) C:\Git\aistudio-copilot-sample>python src/run.py --evaluate --implementation aisdk
Traceback (most recent call last):
File "C:\Git\aistudio-copilot-sample\src\run.py", line 260, in
result, tabular_result = run_evaluation(chat_completion, name=evaluation_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Git\aistudio-copilot-sample\src\run.py", line 83, in run_evaluation
from azure.ai.generative.evaluate import evaluate
File "C:\Git\aistudio-copilot-sample.venv\Lib\site-packages\azure\ai\generative\evaluate_init_.py", line 8, in
from ._evaluate import evaluate
File "C:\Git\aistudio-copilot-sample.venv\Lib\site-packages\azure\ai\generative\evaluate_evaluate.py", line 22, in
from azure.ai.generative.evaluate._metric_handler import MetricHandler
File "C:\Git\aistudio-copilot-sample.venv\Lib\site-packages\azure\ai\generative\evaluate_metric_handler.py", line 6, in
from azure.ai.generative.evaluate._constants import TYPE_TO_KWARGS_MAPPING
File "C:\Git\aistudio-copilot-sample.venv\Lib\site-packages\azure\ai\generative\evaluate_constants.py", line 13, in
QA: constants.QUESTION_ANSWERING,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'azureml.metrics.constants' has no attribute 'QUESTION_ANSWERING'

This is resolved since azure-ai-generative 1.0.0b3 version.