Skip to content
Snippets Groups Projects
Commit 4ed574ab authored by Taylor Cramer's avatar Taylor Cramer Committed by tensorflow-copybara
Browse files

Propagate container_type and include it in type equality checks.

Previously, NamedTupleTypeWithPyContainerType was often lost and turned into
a NamedTupleType without the container. This resulted in users being given
AnonymousTuples when a more specific container should have been returned.

This change fixes a large number of sites where container types were lost, and
adjusts usage sites as appropriate, including the removal of `from_tff_result`
functions.

This change also makes the `__eq__` function for
`NamedTupleTypeWithPyContainerType` require equivalent container types, rather
than just equivalent field structure. Call sites that wished to compare only
field structure are adjusted to use `Type.{is, check}_equivalent_to`.

PiperOrigin-RevId: 321883012
parent cfc3cff7
No related branches found
No related tags found
Loading
Showing
with 363 additions and 146 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment