Skip to content

Azure Foundry Project Evaluation which is in preview mode, Not able to use Evaluation dashboard in portal #282

@AakashJhaTW

Description

@AakashJhaTW

Operating System

MacOS

Version Information

We using the below approach for evaluation, out chat model, we read the data from table storage, and used for eval, but somehow on locally we are getting the result. but we are not getting any update on the dashboard, even though our evaluation is successful at local.

Try different approaches for Azure integration

        try:
            # Approach 1: Try with project scope dictionary
            project_scope = {
                "subscription_id": CONFIG.get("AZURE_SUBSCRIPTION_ID"),
                "resource_group_name": CONFIG.get("AZURE_RESOURCE_GROUP_NAME"),
                "project_name": CONFIG.get("AZURE_AI_PROJECT_NAME"),
            }

            evaluation_result = evaluate(
                data=data_file,
                evaluation_name=evaluation_name,
                evaluators=self._evaluators,
                evaluator_config={
                    "default": {
                        "query": {"${data.query}"},
                        "response": {"${data.response}"},
                        "context": {"${data.context}"},
                    }
                },
                azure_ai_project=project_scope,
                output_path=output_path,
            )
            logger.info(
                "Azure AI Project integration successful with project scope"
            )

        except Exception as azure_error:
            logger.warning(f"Azure integration failed: {azure_error}")
            logger.info("Falling back to local evaluation only")

Steps to reproduce

  1. Configure the key in .env:

Replace connection string with endpoint and project name

AZURE_AI_PROJECT_ENDPOINT=
AZURE_SUBSCRIPTION_ID=
AZURE_RESOURCE_GROUP_NAME=
AZURE_AI_PROJECT_NAME=

Keep your existing OpenAI and storage configs

AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_DEPLOYMENT=
AZURE_OPENAI_API_VERSION=
AZURE_OPENAI_API_KEY=
AZURE_STORAGE_CONNECTION_STRING=
AZURE_STORAGE_TABLE_NAME=
EVALUATION_OUTPUT_PATH=

  1. use the above code, and try to run evaluate

Expected behavior

It should create a dashboard at Azure Portal in Evaluation section. i was able to do that in Foundry hub

Actual behavior

it is not able to create the dasbaord

Addition information

i am using the library:

from azure.ai.projects import AIProjectClient
from azure.ai.evaluation import (
evaluate,
GroundednessEvaluator,
CoherenceEvaluator,
RelevanceEvaluator,
)
from azure.identity import DefaultAzureCredential

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions