Skip to content

Commit d93aaf8

Browse files
authored
Update cloud-evaluation.md
1 parent 9268b9f commit d93aaf8

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/ai-foundry/how-to/develop/cloud-evaluation.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ If this is your first time running evaluations and logging it to your Azure AI F
5050
```python
5151
import os
5252

53-
Required environment variables:
54-
endpoint = os.environ["PROJECT_ENDPOINT"] https://<account>.services.ai.azure.com/api/projects/<project>
55-
model_endpoint = os.environ["MODEL_ENDPOINT"] https://<account>.services.ai.azure.com
56-
model_api_key = os.environ["MODEL_API_KEY"]
53+
# Required environment variables:
54+
endpoint = os.environ["PROJECT_ENDPOINT"] # https://<account>.services.ai.azure.com/api/projects/<project>
55+
model_endpoint = os.environ["MODEL_ENDPOINT"] # https://<account>.services.ai.azure.com
56+
model_api_key = os.environ["MODEL_API_KEY"]
57+
model_deployment_name = os.environ["MODEL_DEPLOYMENT_NAME"] # E.g. gpt-4o-mini
5758

58-
Optional: Reuse an existing dataset.
59+
# Optional: Reuse an existing dataset.
5960
dataset_name = os.environ.get("DATASET_NAME", "dataset-test")
6061
dataset_version = os.environ.get("DATASET_VERSION", "1.0")
6162
```
@@ -162,7 +163,7 @@ from azure.ai.ml import MLClient
162163
from azure.ai.ml.entities import Model
163164
from promptflow.client import PFClient
164165

165-
# Define `ml_client` to register the custom evaluator.
166+
# Define ml_client to register the custom evaluator.
166167
ml_client = MLClient(
167168
subscription_id=os.environ["AZURE_SUBSCRIPTION_ID"],
168169
resource_group_name=os.environ["AZURE_RESOURCE_GROUP"],
@@ -213,15 +214,15 @@ model_config = dict(
213214
type="azure_openai"
214215
)
215216

216-
# Define `ml_client` to register the custom evaluator.
217+
# Define ml_client to register the custom evaluator.
217218
ml_client = MLClient(
218219
subscription_id=os.environ["AZURE_SUBSCRIPTION_ID"],
219220
resource_group_name=os.environ["AZURE_RESOURCE_GROUP"],
220221
workspace_name=os.environ["AZURE_PROJECT_NAME"],
221222
credential=DefaultAzureCredential()
222223
)
223224

224-
# Convert the evaluator to evaluation flow and save it locally.
225+
# # Convert the evaluator to evaluation flow and save it locally.
225226
local_path = "friendliness_local"
226227
pf_client = PFClient()
227228
pf_client.flows.save(entry=FriendlinessEvaluator, path=local_path)

0 commit comments

Comments
 (0)