saul icon indicating copy to clipboard operation
saul copied to clipboard

Reading a trained model!

Open kordjamshidi opened this issue 9 years ago • 6 comments
trafficstars

kordjamshidi avatar Jan 02 '16 04:01 kordjamshidi

It seems we need a different constructor for the classifier inside Learnable. When loading model the lex and lc should not be removed but used.

kordjamshidi avatar Jan 02 '16 17:01 kordjamshidi

Ah! I see the same problem here :https://github.com/IllinoisCogComp/saul/blob/master/saul-examples/src/main/scala/edu/illinois/cs/cogcomp/saulexamples/nlp/EmailSpam/spamClassifiers.scala#L28 this usecache flag should not be here inside the definition of the classifier, it should be passed to the constructor. How we can do it? Do @sameersingh or anyone else have any idea? I need to do the same thing for loading a pre trained classifier.

kordjamshidi avatar Jan 02 '16 17:01 kordjamshidi

You can create a function that takes the parameter and returns this object with the appropriate usecache flag set.

sameersingh avatar Jan 09 '16 07:01 sameersingh

Thank you, for now, the save() and load() seems to be fine. But the implementation is still an issue because the model has not been saved properly in general. https://github.com/IllinoisCogComp/saul/blob/master/saul-core/src/main/scala/edu/illinois/cs/cogcomp/saul/classifier/Learnable.scala#L108 . I keep this issue open.

kordjamshidi avatar Jan 09 '16 17:01 kordjamshidi

@kordjamshidi is it still a valid issue?

danyaljj avatar Nov 07 '16 02:11 danyaljj

I think load and save can be refined still, yes. When we need to specify the path, if a path is not there what happens, etc. It is both syntax variation and documentation issue.

kordjamshidi avatar Nov 07 '16 03:11 kordjamshidi