-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IR] Improve from_proto/to_proto typing with overloads (#1992)
- Use typing.overload to annotate the from_proto method for accurate type hinting. With this change we can recommend users to use `ir.from/to_proto` over the `ir.serde.(de)serialize*` methods and still keep mypy happy. This simplifies the serialization apis for users. - Create deserialize_tensor_shape to deserialize tensor shapes.
- Loading branch information
1 parent
9f79317
commit 854b5d9
Showing
2 changed files
with
83 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters