Skip to content

Fix aoai nonfinite input - #49939

Merged
Shruti Iyer (shrutiyer) merged 2 commits into
Azure:mainfrom
shrutiyer:shruti/fix-aoai-nonfinite-input
Nov 11, 2026
Merged

Shruti Iyer (shrutiyer) merged 2 commits into
Azure:mainfrom
shrutiyer:shruti/fix-aoai-nonfinite-input

Conversation

@shrutiyer

Copy link
Copy Markdown
Contributor

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Shruti Iyer and others added 2 commits November 10, 2026 12:09
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
@shrutiyer
Shruti Iyer (shrutiyer) requested a review from a team as a code owner November 10, 2026 22:02
Copilot AI balanced review requested due to automatic review settings November 10, 2026 22:02
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

The sdk-api-review-ready label cannot create a review PR for this working PR because its branch is in a fork repository. Prefer a working branch in the registered upstream repository, or reach out to the ARH maintainers for help. Fork reviews are supported through the Azure SDK CLI (azsdk apireview create), but the fork requires its own ARH registration and the review PR is created in the fork rather than the upstream repository.

@shrutiyer Shruti Iyer (shrutiyer) changed the title Shruti/fix aoai nonfinite input Fix aoai nonfinite input Nov 10, 2026
@github-actions github-actions Bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Nov 10, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 EvaluationException errors.
  • 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

@shrutiyer
Shruti Iyer (shrutiyer) merged commit 1022a9f into Azure:main Nov 11, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Evaluation Issues related to the client library for Azure AI Evaluation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants