Why are ModelDescriptor and ModelDescriptorBuilder not serializable?

10 views
Skip to first unread message

Gary Geniesse

unread,
Mar 6, 2021, 1:23:07 PMMar 6
to H2O Open Source Scalable Machine Learning - h2ostream
In migrating to H2O SparklingWater 3.32, I am encountering an error during the serialization of hex.genmodel.MojoModel objects. Specifically, MojoModel serialization often fails with NotSerializableException relating to _modelDescriptor:

Caused by: java.io.NotSerializableException: hex.genmodel.descriptor.ModelDescriptorBuilder$1
- field (class "hex.genmodel.MojoModel", name: "_modelDescriptor", type: "interface hex.genmodel.descriptor.ModelDescriptor")
- object (class "hex.genmodel.algos.gbm.GbmMojoModel", 
...

I understand MojoModels are normally saved and reloaded as MOJO files. We do use the files for long-term storage. However, for short-term caching, our code relies on serialization.

MojoModel implements Serializable. 

However, ModelDescriptor and ModelDescriptorBuilder do not implement Serializable. In fact, it appears it was originally intended to be, but the unused imports were removed in an update on June 17.2019:

It seems like all serialized variables in MojoModel should implement Serializable.

I do understand that it is possible that some part of our model definition is breaking the serialization process and we are continuing to investigate that. If possible, we will try to extract a minimum example. However, I wanted to raise this question as we continue to investigate the issue.
Reply all
Reply to author
Forward
0 new messages