Skip to content

Add MEAI.Evaluation libraries - #5873

Merged
shyamnamboodiripad merged 41 commits into
dotnet:mainfrom
shyamnamboodiripad:eval
Feb 13, 2025
Merged

Add MEAI.Evaluation libraries#5873
shyamnamboodiripad merged 41 commits into
dotnet:mainfrom
shyamnamboodiripad:eval

Conversation

@shyamnamboodiripad

@shyamnamboodiripadshyamnamboodiripad commented Feb 11, 2025

Copy link
Copy Markdown
Contributor
Microsoft Reviewers: Open in CodeFlow

@shyamnamboodiripad

shyamnamboodiripad commented Feb 11, 2025

Copy link
Copy Markdown
ContributorAuthor

Comment threadeng/Versions.props Outdated
Comment threadscripts/ConfigureEvaluationTests.ps1
@RussKieRussKie added the area-ai-eval Microsoft.Extensions.AI.Evaluation and related label Feb 11, 2025
@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️Found issues‼️

ProjectCoverage TypeExpectedActual
Microsoft.Extensions.AI.Evaluation.ReportingLine8873.56 🔻
Microsoft.Extensions.AI.Evaluation.ReportingBranch8864.8 🔻
Microsoft.Extensions.AI.Evaluation.QualityLine886.44 🔻
Microsoft.Extensions.AI.Evaluation.QualityBranch8813.85 🔻
Microsoft.Extensions.AI.EvaluationLine8861.54 🔻
Microsoft.Extensions.AI.EvaluationBranch8864.29 🔻
Microsoft.Extensions.AI.OpenAILine7771.71 🔻
Microsoft.Extensions.AI.OpenAIBranch7753.28 🔻
Microsoft.Extensions.AI.OllamaLine8078.2 🔻
Microsoft.Gen.MetadataExtractorLine9857.35 🔻
Microsoft.Gen.MetadataExtractorBranch9862.5 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

ProjectExpectedActual
Microsoft.Extensions.AI.Abstractions8385
Microsoft.Extensions.AI.AzureAIInference9192
Microsoft.Extensions.AI8889
Microsoft.Extensions.Caching.Hybrid8687

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=947607&view=codecoverage-tab

Comment threadsrc/Libraries/Microsoft.Extensions.AI.Evaluation/CompositeEvaluator.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.AI.Evaluation/EvaluatorExtensions.cs Outdated
@stephentoub

Copy link
Copy Markdown
Member

I rebased this on main after merging API changes, and added a commit here that adapts to those changes (just a few tweaks needed).

@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️Found issues‼️

ProjectCoverage TypeExpectedActual
Microsoft.Extensions.AI.OllamaLine8078.2 🔻
Microsoft.Extensions.AI.Evaluation.ReportingLine8872.06 🔻
Microsoft.Extensions.AI.Evaluation.ReportingBranch8864.8 🔻
Microsoft.Extensions.AI.Evaluation.QualityLine887.57 🔻
Microsoft.Extensions.AI.Evaluation.QualityBranch8816.42 🔻
Microsoft.Extensions.AI.EvaluationLine8858.67 🔻
Microsoft.Extensions.AI.EvaluationBranch8856.67 🔻
Microsoft.Extensions.Caching.HybridLine8682.92 🔻
Microsoft.Extensions.AI.OpenAILine7768.75 🔻
Microsoft.Extensions.AI.OpenAIBranch7750.41 🔻
Microsoft.Gen.MetadataExtractorLine9857.35 🔻
Microsoft.Gen.MetadataExtractorBranch9862.5 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

ProjectExpectedActual
Microsoft.Extensions.AI.AzureAIInference9192
Microsoft.Extensions.AI.Abstractions8385
Microsoft.Extensions.AI8889

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=950078&view=codecoverage-tab

@peterwaldpeterwald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are items we need to follow up on, but nothing that should block at this point in my opinion.

@shyamnamboodiripad
shyamnamboodiripad enabled auto-merge (squash) February 12, 2025 23:01
@dotnetdotnet deleted a comment from dotnet-comment-botFeb 12, 2025
@dotnetdotnet deleted a comment from dotnet-comment-botFeb 12, 2025
@dotnetdotnet deleted a comment from dotnet-comment-botFeb 12, 2025
@dotnetdotnet deleted a comment from dotnet-comment-botFeb 12, 2025
@dotnetdotnet deleted a comment from dotnet-comment-botFeb 12, 2025
Comment threadeng/pipelines/templates/BuildAndTest.yml
Comment on lines +29 to +30
// To avoid infinite loops, ignore exceptions that were already seen.
if (seen.Add(current))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How would you get an infinite loop anyway? This method only loops for AggregateException.InnerExceptions, and I don't see how that could ever return a collection that includes the same AggregateException:

  • AggregateException.InnerExceptions returns ReadOnlyCollection<Exception> so one cannot use that to modify the InnerExceptions collection of an existing AggregateException.
  • AggregateException.InnerExceptions is not virtual so a class derived from AggregateException cannot override InnerExceptions to return something circular.
  • The AggregateException constructor copies the list of inner exceptions so AggregateException.InnerExceptions won't be affected if the caller later modifies the original list.
  • C# does not allow the following so you cannot pass the AggregateException reference to its own constructor.
    usingSystem;publicclassMaliciousException:AggregateException{publicMaliciousException():base(innerExceptions:[this])// error CS0027: Keyword 'this' is not available in the current context{}}

Exponential complexity would be possible though, if there are $m$ layers of $n$ AggregateException instances and each exception in layer $k$ has all exceptions in layer $k+1$ as its inner exceptions. So the HashSet will in theory protect against that.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai-evalMicrosoft.Extensions.AI.Evaluation and related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@shyamnamboodiripad@dotnet-comment-bot@stephentoub@peterwald@RussKie@KalleOlaviNiemitalo