tensorflow: add tf.distribute.experimental.coordinator.RemoteValue (#11349)

This commit is contained in:
Hoël Bagard
2024-02-17 14:11:21 +09:00
committed by GitHub
parent d5ff34e049
commit 69354d78ad
2 changed files with 14 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ tensorflow._aliases
# but the real module file is completely different name (even package) and dynamically handled.
# tf.initializers at runtime is <module 'keras.api._v2.keras.initializers' from '...'>
tensorflow.initializers
# Another cursed import magic similar to the one above.
tensorflow.distribute.experimental.coordinator
# Layer constructor's always have **kwargs, but only allow a few specific values. PEP 692
# would allow us to specify this with **kwargs and remove the need for these exceptions.

View File

@@ -0,0 +1,12 @@
from _typeshed import Incomplete
from typing import Generic, TypeVar
from tensorflow._aliases import AnyArray
_Value = TypeVar("_Value", covariant=True)
class RemoteValue(Generic[_Value]):
def fetch(self) -> AnyArray: ...
def get(self) -> _Value: ...
def __getattr__(name: str) -> Incomplete: ...