save model on server retrain, save/restore model in tests