Skip to content
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

Protobuf serialization for math types #262

Merged
merged 12 commits into from
Aug 25, 2022
Merged

Protobuf serialization for math types #262

merged 12 commits into from
Aug 25, 2022

Conversation

Craigacp
Copy link
Member

Description

Adds ProtoSerializable to all serializable types in tribuo-math and their subclasses. A more detailed description of the overall protobuf plan is given in #226.

Motivation

We need to move off Java Serialization.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 21, 2022
@Craigacp Craigacp added the squash-commits Squash the commits when merging this PR label Aug 22, 2022
Copy link
Member

@pogren pogren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Parameters, Kernel, VectorNormalizaer, Tensor, etc. interfaces are now ProtoSerializable and a bunch of impls implement serialize and deserializeFromProto
  • added a bunch of equals, hashCode, constructors, and factory methods to support this
  • added Util.product method

Everything here looks straightforward and much of the code has reasonable unit tests. A few classes e.g. CRFParameter and FMParameters could use some unit testing for the proto serializable.

@Craigacp
Copy link
Member Author

I plan to add serialization unit tests for CRFModel when we get to that point which will necessarily test CRFParameters rather than individually unit testing CRFParameters. Ditto for FMParameters.

@Craigacp Craigacp merged commit 5b6167f into main Aug 25, 2022
@Craigacp Craigacp deleted the math-serialization branch August 25, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement. squash-commits Squash the commits when merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants