Comments (14)
I use XStream (http://xstream.codehaus.org) for serialization of models. Can you have a try? Thanks!
from smile.
Previously, all models support Serializable interface. However, I remove them due to several concerns. For example, the exact format is hard to keep stable, class changes can easily make your serialized data unreadable, reading/writing the data in non-Java code is almost impossible. I am still looking for a simple and flexible solution. Currently, XStream seems good enough and your classes don't need implement any interfaces. In the future, I would like to support PMML for some models.
I am very open to this question and would like to listen all kinds of suggestions! Thanks!
from smile.
Fair enough. Thanks for the suggestion ;) Really appreciated. I am gonna close the issue.
from smile.
Can you please reopen this ticket? I would like to listen to different voice. Hope more people will see this ticket. Thanks!
from smile.
Thanks!
from smile.
Protostuff(https://code.google.com/p/protostuff/) or Hessian(http://hessian.caucho.com/doc/hessian-serialization.html)? I use them to compress the loaded Objects in my LSH of SimHash version. It reduce the memory of old generation of jvm. In my case, the serialized objects of Protostuff are smaller.
from smile.
Thanks! I will check out them.
from smile.
Protostuff looks very good. But seems we need create schema for every model. A lof of work.
from smile.
I think schema is used to keep compatible if the model has to be changed.
Otherwise, runtime schema can be used and it doesn't need too much code as shown in the example code.
from smile.
Sounds great! Will learn more about it. If we choose it, would you like to work together on it? Thanks!
from smile.
Of course :)
2015-03-25 21:52 GMT+08:00 Haifeng Li [email protected]:
Sounds great! Will learn more about it. If we choose it, would you like to
work together on it? Thanks!—
Reply to this email directly or view it on GitHub
#20 (comment).
from smile.
With runtime schema, it seems that the usage of ProtoStuff is similar with XStream. I prefer not to modify the model object for specific serialization library. So it is better for the users to choose whatever they want. If we finally choose some serialization library, I still want to do it in a separate module and leave smile-core unchanged.
from smile.
A second thought: do we really need backward/forward compatibility? If the model member variables change, it usually means a serious change to the algorithm. It is better to retrain the model rather than importing the old model.
from smile.
Any comments (or complains) to my second thoughts? Thanks!
from smile.
Related Issues (20)
- Ability to stop TSNE, possibly other time-heavy computations HOT 1
- rbf kernel? HOT 3
- [FEATURE PROPOSAL] ARPACK wrapper functions HOT 2
- Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopenblas_nolapack in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib HOT 13
- Tree Representation for Regression Models in Google Earth Engine HOT 1
- Takes more memory for LSH model in NearestNeighborSearch HOT 6
- Gamma random number generator support only integer shape parameter. HOT 1
- java.lang.StackOverflowError HOT 1
- svm HOT 1
- Jitpack builds are failing since 3.x HOT 2
- FR: Compact "how to load dirty data" example HOT 1
- Arff.java writeField can fail when type isn't in the list of handled types HOT 1
- BarPlot.getUpperBound() computes wrong bound. HOT 1
- FR: Warn before trying to train where the label column has any nulls HOT 1
- Dot product Question HOT 2
- stringVector(0) error HOT 1
- Suggest changing license to Apache 2.0 license or MIT
- Non-monotonic cluster tree -- the linkage is probably not appropriate! HOT 1
- HiddenLayerBuilder does not add dropout to HiddenLayer HOT 4
- Method in interface BaseArray can never return an int[] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smile.