Remove unnecessary handling of value attribute.

PiperOrigin-RevId: 788060431
Change-Id: I56acafb211441bd74dbd6e80ab1d8f82ac808c3a
This commit is contained in:
Google DeepMind
2025-07-28 10:18:17 -07:00
committed by Copybara-Service
parent 9e7979e492
commit a116653e5f
-5
View File
@@ -1139,11 +1139,6 @@ class Data(PyTreeNode):
}[type(self._impl)]
def __getattr__(self, name: str):
if name == 'value':
# Special case for NNX, the value attribute may not exist on the parent
# PyTreeNode, before it exists on the child PyTreeNode. Thanks NNX.
return object.__getattribute__(self, 'value')
try:
impl_instsance = object.__getattribute__(self, '_impl')
val = getattr(impl_instsance, name)