Repository navigation
Fix aoai nonfinite input - #49939
Fix aoai nonfinite input#49939Shruti Iyer (shrutiyer) merged 2 commits into
Conversation
Normalize pandas missing scalars only where the declared schema permits null. Preserve non-nullable values for validation, keep finite and legacy text conversions unchanged, and reject invalid request JSON with a typed input error before submission. Validation: 365 AOAI unit tests passed, two existing tests skipped. Black 24.4.0 check passed for 424 package Python files. Authored-by: GitHub Copilot CLI v1.0.100 Model: GPT-6.1 Sol (gpt-6.1-sol) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 60786db0-5908-4765-8427-30ca14978340
…ions as user errors Replace the schema-aware normalization with a minimal float NaN to null conversion on the explicit-schema path, and map AOAI 400/422 run-creation rejections to user errors. Remove the changelog entry. Authored-by: GitHub Copilot CLI v1.0.100 Model: claude-opus-5.5 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 60786db0-5908-4765-8427-30ca14978340
|
The |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Non-finite values remain unhandled in nested payloads and for either infinity sign, causing strict JSON serialization failures before the intended error handling can run.
1 open issue
What changed in this PR
This PR improves input handling for Azure OpenAI evaluation runs in azure-ai-evaluation.
Changes:
- Converts scalar NaN values in explicitly declared fields to JSON null.
- Wraps AOAI 400/422 input rejections as user-blamed
EvaluationExceptionerrors. - Adds regression tests for missing numeric values and error propagation.
| File | Description |
|---|---|
sdk/evaluation/azure-ai-evaluation/tests/unittests/test_evaluate_aoai.py |
Tests input-rejection messages, user blame, and exception chaining. |
sdk/evaluation/azure-ai-evaluation/tests/unittests/test_aoai_data_source.py |
Tests missing numeric values becoming null and strict JSON serialization. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate_aoai.py |
Normalizes scalar NaN and translates AOAI input-rejection errors. |
Review effort: Balanced

Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines