Skip to content

Conversation

shyamnamboodiripad
Copy link
Contributor

@shyamnamboodiripad shyamnamboodiripad commented Apr 5, 2025

When importing default-exported modules, the JavaScript runtime creates an object with both the properties of the exported object and a 'default' property containing the same data. In the case of the download functionality in the report, this results in the evaluation data being duplicated in the downloaded file (once at the root level and then again inside the 'default' property under the root level).

The fix in this commit avoids the problem by serializing the contents of the 'default' property if present and falling back to serializing the outer object otherwise.

Microsoft Reviewers: Open in CodeFlow

When importing default-exported modules, the JavaScript runtime creates an object with both the properties of the exported object and a 'default' property containing the same data. In the case of the download functionality in the report, this results in the evaluation data being duplicated in the downloaded file (once at the root level and then again inside the 'default' property under the root level).

The fix in this commit avoids the problem by serializing the contents of the 'default' property if present and falling back to serializing the outer object otherwise.
@shyamnamboodiripad shyamnamboodiripad requested a review from a team as a code owner April 5, 2025 00:01
@github-actions github-actions bot added the area-ai-eval Microsoft.Extensions.AI.Evaluation and related label Apr 5, 2025
@shyamnamboodiripad shyamnamboodiripad enabled auto-merge (squash) April 5, 2025 00:28
@shyamnamboodiripad shyamnamboodiripad merged commit 2fbf998 into dotnet:main Apr 5, 2025
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2025
@shyamnamboodiripad shyamnamboodiripad deleted the fixdownload branch May 14, 2025 12:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai-eval Microsoft.Extensions.AI.Evaluation and related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants