From 55321571ac7ea222076919e635774f11b9108fce Mon Sep 17 00:00:00 2001 From: Hoel Bagard Date: Thu, 1 Feb 2024 08:25:29 +0900 Subject: [PATCH] Add PythonState --- stubs/tensorflow/tensorflow/train/experimental.pyi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stubs/tensorflow/tensorflow/train/experimental.pyi b/stubs/tensorflow/tensorflow/train/experimental.pyi index 0f6820f054ea..c7f3c0ded5ec 100644 --- a/stubs/tensorflow/tensorflow/train/experimental.pyi +++ b/stubs/tensorflow/tensorflow/train/experimental.pyi @@ -1,3 +1,13 @@ +import abc from _typeshed import Incomplete +from typing_extensions import Self + +from tensorflow.python.trackable.base import Trackable + +class PythonState(Trackable, metaclass=abc.ABCMeta): + @abc.abstractmethod + def serialize(self) -> str: ... + @abc.abstractmethod + def deserialize(self, string_value: str) -> Self: ... def __getattr__(name: str) -> Incomplete: ...