Skip to content

Commit

Permalink
tensorflow: add tf.distribute.experimental.coordinator.RemoteValue (
Browse files Browse the repository at this point in the history
  • Loading branch information
hoel-bagard authored Feb 17, 2024
1 parent d5ff34e commit 69354d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stubs/tensorflow/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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: ...

0 comments on commit 69354d7

Please sign in to comment.