(self, name)
| 377 | """A map from device to values; acts as the same type as the values.""" |
| 378 | |
| 379 | def __getattr__(self, name): |
| 380 | # The '_use_resource_variables' and the attrs starts with '_self' are used |
| 381 | # for restoring the saved_model proto. At the point these attrs are queried, |
| 382 | # the variable has not been initialized. Thus it should not query those of |
| 383 | # the underlying components. |
| 384 | if name.startswith("_self_") or name == "_use_resource_variables": |
| 385 | return super(DistributedDelegate, self).__getattr__(name) |
| 386 | |
| 387 | # TODO(priyag): This needs to be made robust against pitfalls from mix use |
| 388 | # __getattr__ and @property. See b/120402273. |
| 389 | return getattr(self.get(), name) |
| 390 | |
| 391 | def _get_as_operand(self): |
| 392 | """Returns the value for operations for the current device. |
nothing calls this directly
no test coverage detected