AzureContentUnderstanding: ExtractAsync throws when a chart figure's content is a JSON string
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
Línea de trabajo
Empieza con Directory.Packages.props y DocumentExtraction/src/AzureContentUnderstanding/ContentUnderstandingExtractionClient.cs, y luego revisa la corrección del SDK enlazada y la prueba de reproducción de AzureContentUnderstanding.UnitTests descrita en la incidencia. Cuando Azure.AI.ContentUnderstanding publique la corrección, actualiza la versión del paquete y añade una prueba en la que content de una figura de gráfico sea una cadena JSON; verifica que la extracción devuelva el documento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The Content Understanding provider fails on documents with some charts. The cause is a defect in Azure.AI.ContentUnderstanding 1.1.0, the version in Directory.Packages.props: Azure/azure-sdk-for-net#57370. The fix is proposed in Azure/azure-sdk-for-net#64660.
What happens
For some charts the service returns the content of a chart figure, the Chart.js config, as an escaped JSON string instead of an object. The service team confirmed it in Azure/azure-sdk-for-net#57370. The SDK cannot deserialize the result, so operation.Value in ContentUnderstandingExtractionClient.ExtractAsync throws, and no part of the document is returned:
System.InvalidOperationException: The requested operation requires an element of type 'Object', but the target element has type 'String'.
at System.Text.Json.JsonElement.EnumerateObject()
at Azure.AI.ContentUnderstanding.DocumentChartFigure.DeserializeDocumentChartFigure(JsonElement element, ModelReaderWriterOptions options)
...
at Azure.Core.ProtocolOperationHelpers.ConvertOperation`2.get_Value()
at CommunityToolkit.DocumentExtraction.AzureContentUnderstanding.ContentUnderstandingExtractionClient.ExtractAsync(Stream document, String identifier, String mediaType, DocumentExtractionOptions options, CancellationToken cancellationToken)
Only analyzers that return chart figures can hit it, such as prebuilt-documentSearch: in our run, its chart came back as an object. The default, prebuilt-document, returns no figures.
How it was checked
A test in AzureContentUnderstanding.UnitTests replays a real prebuilt-layout result whose figure is changed into a chart figure, as prebuilt-documentSearch returns it. The provider sources are the ones on main, on .NET 10.
- With 1.1.0 and the chart content as an object,
ExtractAsyncreturns the document. - With 1.1.0 and the chart content as a string,
ExtractAsyncthrows the exception above. - With a build of the SDK that has the fix, both cases pass, and so do the other 136 tests of the project.
In the toolkit
When a release of Azure.AI.ContentUnderstanding includes the fix, the version in Directory.Packages.props can move to it, with a test on a chart figure whose content is a string.
- Lenguaje dominante
- C#
- Estrellas
- 15
- Forks
- 9
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CommunityToolkit/AI
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CommunityToolkit/AI#19 ·
Los mantenedores suelen responder en 1 día
-
bug documentation
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
CommunityToolkit/AI#95 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
CommunityToolkit/AI#85 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
CommunityToolkit/AI#61 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
CommunityToolkit/AI#59 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de CommunityToolkit/AI
Issues similares
-
[Core] IPlatformServices.PrefersDarkTheme: the desktop's theme as the signed-in user sees itAbiertoarea: core bug help wanted ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ZaidX88/sluice#265 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: remote bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Install a C# EnvironmentAbierto📅 Sprint 4 Module-Tools Setup Submit:None 🦔 Size Tiny
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
CodeYourFuture/Module-Tools#712 ·
-
A: Mapping P3: Standard T: New Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
space-wizards/space-station-14#46878 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 60/100
CommunityToolkit/Windows#896 · 2 comentarios ·