8000 `tensorflow`: Add `tensorflow.keras.models.Model` by hoel-bagard · Pull Request #11334 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

tensorflow: Add tensorflow.keras.models.Model #11334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
145c6d5
begin adding models.Model
hoel-bagard Jan 28, 2024
538a254
add Model's call, __new__ and build to allowlist (similar to Layer)
hoel-bagard Jan 31, 2024
3c87c8f
merge with main
hoel-bagard Feb 17, 2024
ca07f57
uncomment code.
hoel-bagard Feb 17, 2024
c11817d
fix: fix model in callbacks
hoel-bagard Feb 17, 2024
fccfb0e
Merge branch 'main' into hoel/add_tf_keras_models
hoel-bagard Feb 17, 2024
efdda57
Remove optimizer alias
hoel-bagard Feb 17, 2024
c58c9aa
fix: Tensor's name
hoel-bagard Feb 17, 2024
ca259ae
add pre-existing stubs.
hoel-bagard Feb 18, 2024
1786589
add saved_model.experimental
hoel-bagard Feb 18, 2024
986df8c
add read_fingerprint
hoel-bagard Feb 18, 2024
4282a1f
Add empty func_graph
hoel-bagard Feb 18, 2024
bac52fd
Add empty autotrackable
hoel-bagard Feb 18, 2024
057e9e7
add types.experimental from pre-existing stubs
hoel-bagard Feb 18, 2024
748537d
complete stubs/tensorflow/tensorflow/saved_model/__init__.pyi
hoel-bagard Feb 18, 2024
31f30c2
merge with main
hoel-bagard Feb 18, 2024
42895b4
fix import
hoel-bagard Feb 18, 2024
3cbd71a
fix some typing issues (runtime comparison)
hoel-bagard Feb 18, 2024
2e1dbf8
add missing return type
hoel-bagard Feb 18, 2024
ed5c54c
Make GenericFunction's get_concrete_function abstract.
hoel-bagard Feb 18, 2024
bf1a41d
add missing GenericFunction method
hoel-bagard Feb 18, 2024
0ed95da
Merge branch 'hoel/add_tf_saved_model' into hoel/add_tf_keras_models
hoel-bagard Feb 18, 2024
a151415
fix SaveOptions import
hoel-bagard Feb 18, 2024
77f7a8d
make pss_evaluation_shards not keyword-only
hoel-bagard Feb 18, 2024
b61885f
try to fix jax issues.
hoel-bagard Feb 18, 2024
6251ab4
Merge branch 'main' into hoel/add_tf_keras_models
hoel-bagard Feb 28, 2024
b11dd65
Add tensorflow.python to allowlist
hoel-bagard Feb 28, 2024
058bed3
Add tensorflow.distribute.Strategy to allowlist
hoel-bagard Feb 28, 2024
73e38d3
remove unused allowlist entries
hoel-bagard Feb 28, 2024
d817dbe
Merge branch 'main' into hoel/add_tf_keras_models
JelleZijlstra Mar 12, 2024
fbc0199
Merge branch 'main' into hoel/add_tf_keras_models
JelleZijlstra Mar 13, 2024
104164a
merge with main
hoel-bagard Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
uncomment code.
  • Loading branch information
hoel-bagard committed Feb 17, 2024
commit ca07f575445380c18a4fea62e3a04978ba57d65c
5 changes: 5 additions & 0 deletions stubs/tensorflow/tensorflow/distribute/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from _typeshed import Incomplete

Strategy = Incomplete

def __getattr__(name: str) -> Incomplete: ...
12 changes: 6 additions & 6 deletions stubs/tensorflow/tensorflow/keras/models.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ class Model(Layer[_InputT, _OutputT], tf.Module):
@property
def metrics_names(self) -> list[str]: ...
@property
def distribute_strategy(self) -> Incomplete: ... # tf.distribute.Strategy
def distribute_strategy(self) -> tf.distribute.Strategy: ...
@property
def run_eagerly(self) -> bool: ...
# @property
# def autotune_steps_per_execution(self) -> Incomplete: ... # not present at runtime
# @property
# def steps_per_execution(self) -> int: ... # Requires a compiled model. # not present at runtime
@property
def autotune_steps_per_execution(self) -> bool: ...
@property
def steps_per_execution(self) -> int | None: ... # Returns None for a non-compiled model.
@property
def jit_compile(self) -> bool: ...
@property
Expand Down Expand Up @@ -145,7 +145,7 @@ class Model(Layer[_InputT, _OutputT], tf.Module):
reset_metrics: bool = True,
return_dict: bool = False,
) -> float | list[float]: ...
def predict_on_batch(self, x: Iterator[_InputT]) -> Incomplete: ... # npt.NDArray[_OutputT]
def predict_on_batch(self, x: Iterator[_InputT]) -> npt.NDArray[Incomplete]: ...
def fit_generator(
self,
generator: Iterator[Incomplete],
Expand Down
0