[BUG] The EnvironmentId field is required error when run project_client.evaluations.create_or_replace_schedule #39175
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Evaluation
Issues related to the client library for Azure AI Evaluation
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
azure-ai-evaluation==1.1.0
azure-ai-projects==1.0.0b4
azure-ai-ml==1.23.1
Describe the bug
I am trying to create scheduled evaluation pipeline looking at Azure AI Evaluation SDK - https://learn.microsoft.com/en-us/azure/ai-studio/how-to/online-evaluation
When I execute the code block I ran into error below.
recurrence_trigger = RecurrenceTrigger(frequency="day", interval=1)
evaluation_schedule = EvaluationSchedule(
data=app_insights_config,
evaluators=evaluators_cloud,
trigger=recurrence_trigger,
description=f"{service_name} evaluation schedule",
properties=properties
)
created_evaluation_schedule = project_client.evaluations.create_or_replace_schedule(service_name, evaluation_schedule)
Code: SystemError
Message: The evaluation submit request failed to submit with reason Service invocation failed!
Request: PUT swedencentral.api.azureml.ms/mferp/managementfrontend/subscriptions/3d4d3dd0-79d4-40cf-a94e-b4154812c6ca/resourceGroups/AOAI-group3/providers/Microsoft.MachineLearningServices/workspaces/aoai-pjt1/schedules/daily-evaluation_2025-01-14-05-43-55
Status Code: 400 BadRequest
Error Code: UserError
Reason Phrase: Request is invalid and/or missing fields.
Response Body: {
"error": {
"code": "UserError",
"message": "Request is invalid and/or missing fields.",
"details": [
{
"code": "RequestInvalid",
"message": "The EnvironmentId field is required.",
"details": [],
"additionalInfo": []
}
],
"additionalInfo": [
{
"type": "ComponentName",
"info": {
"value": "managementfrontend"
}
},
{
"type": "Correlation",
"info": {
"value": {
"operation": "ef0545545fc402ee48b453df65121716",
"request": "6c86c8448c1a1bfd"
}
}
},
{
"type": "Environment",
"info": {
"value": "swedencentral"
}
},
{
"type": "Location",
"info": {
"value": "swedencentral"
}
},
{
"type": "Time",
"info": {
"value": "2025-01-14T06:09:01.7681227+00:00"
}
},
{
"type": "InnerError",
"info": {
"value": {
"code": "RequestInvalid",
"innerError": null
}
}
},
{
"type": "MessageFormat",
"info": {
"value": "Request is invalid and/or missing fields."
}
}
]
}
}
To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: