CogComp / saul

Saul : Declarative Learning-Based Programming
Other
64 stars 18 forks source link

Enable in-memory feature caching for properties #472

Open bhargav opened 7 years ago

bhargav commented 7 years ago

Work Items

Idea: Cache static features that do not change across learning iterations. Improves training speed at the cost of using more memory for caching the features. Tested this on the Chunker app and there is a significant improvements to training time.

danyaljj commented 7 years ago

One big concern I have is the confusion that it might create a little confusion with cache = true (vs isStatic). Especially in the documentation here. We might consider changing the terminology and clarify the difference (+use cases).

danyaljj commented 7 years ago

On the implementation, I'd suggestion different approach: we can reuse the existing caching. The only thing we have to do is to make sure we don't clean in between each training iterations. That is handled here by this function.. So the only change needed is, not calling the clear function for properties for which isStatic is specified.

bhargav commented 7 years ago

This is ready to be reviewed.