sql-machine-learning / sqlflow

Brings SQL and AI together.
https://sqlflow.org
Apache License 2.0
5.07k stars 698 forks source link

Support saving model for multiple times and choose a best one when predicting #373

Open typhoonzero opened 5 years ago

typhoonzero commented 5 years ago

Is your feature request related to a problem? Please describe. While discussing in https://github.com/sql-machine-learning/sqlflow/pull/319, we save the trained model into one table for only one time, in many cases, we want to save the model parameters every training epoch or every several steps ( e.g. save a checkpoint every 100 step ) and then choose the best model to do predicting.

Describe the solution you'd like Probably need to discuss a lot, like supporting save models to remove file system, and saving model together with validation metrics, so that we can choose a "best" model according to the metric you interest in.

tonyyang-svail commented 5 years ago

One solution could be checkpointing on the local file system. At the end of the training, save the best model into one table.