Skip to content

Fix parsing of nested sequences with fixed lengths - #11250

Open
AliAbouelazm wants to merge 1 commit into
tensorflow:masterfrom
AliAbouelazm:fix/nested-sequence-parser-cloud
Open

AliAbouelazm wants to merge 1 commit into
tensorflow:masterfrom
AliAbouelazm:fix/nested-sequence-parser-cloud

Conversation

@AliAbouelazm

Copy link
Copy Markdown

Related to #2243. This fixes nested Sequence parsing, not the separate bare top-level Sequence(Scalar/Text) serialization error, so it does not close that issue.

Nested sequences use ragged flat values and row lengths even when their lengths are fixed. Select the matching TensorFlow parse specification and reconstruct NumPy sequences from stored row lengths, preserving trailing tensor dimensions and empty-row shapes.

Validation:

  • Added 324 round trips covering nesting depths 2 and 3, variable/fixed/zero lengths, scalar/vector/matrix values, and NumPy/eager/graph parsing. Before the fix, 264 failed; all now pass.
  • Final parser, serializer and sequence feature suites: 372 passed, 3 skipped, 3,140 subtests passed.
  • Broader feature testing: 654 passed, 22 skipped, 43,878 subtests passed; 320 image-representation subtests failed due to Pillow 13 compatibility in unchanged code. Representative failures reproduce with the baseline parser. This broader run is not a clean pass.
  • Whitespace checks pass. Pylint retains baseline diagnostics and outdated configuration warnings, so it is not a clean lint pass.
    Tested on Linux with Python 3.12 and TensorFlow CPU 2.21. Full repository CI was not run locally.

@AliAbouelazm
AliAbouelazm marked this pull request as ready for review October 26, 2026 16:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant