MLflow for model persistence

I don’t understand why MLflow is better than pickle or Keras’ native way of model persistence? And for Keras, you would need to provide the custom metrics function when loading a model, isn’t it very inconvenient? And where do you store the function?

Hi, @Y_C Hope you are doing well.
We aren’t defining any comparison in this lesson. Both Keras and pickle have pros and cons, but yes, Keras is more convenient when dealing with custom metrics. We are not storing functions but storing models in the model_path, which is "models/keras_games_v1" in our case. You can specify any path to store them.

How should I choose which model persistence method should be used when actually working in production? Is using MLFlow a must? I find it very strange to only present MLflow and not introducing the pros and cons of it and not comparing it to other methods.
And to define a function at runtime, seems to be very strange to me, maybe introducing train test skew? Is there a better way to do so?

First of all, there is no comparison between Keras and Pickle. Keras is an API limited to deep learning, while Pickle is somewhat used for de-serialization. Secondly, no MLflow is not necessary we can use Keras or Pickle without it, and now talking about pros and cons, yes that’s a good suggestion, but I believe this lesson isn’t all about MLflow.
Can you please clarify which function you are referring to exactly?