ModelRecorder in model_recorder.py contains 2 static functions:
save_best_model
load_model
Conceptually, saving and loading are intrinsic behaviors of a model instance, not generic utilities. The current design requires calling something like:
ModelRecorder.save_best_model(model, …)
This is a classic “ask an external service to manipulate my object” pattern. In OO design, it is usually preferable to tell the object what to do:
Why having static functions to save models, since "saving" and "loading" are actually expected behaviors of the MLP and SklearnModels?
I think it would be more natural to make the functions save_best_model and load_model inside MLP and SklearnModels.
wdyt?
@thadeuluiz @Mathtzt @czewski
ModelRecorderin model_recorder.py contains 2 static functions:save_best_modelload_modelConceptually, saving and loading are intrinsic behaviors of a model instance, not generic utilities. The current design requires calling something like:
This is a classic “ask an external service to manipulate my object” pattern. In OO design, it is usually preferable to tell the object what to do:
Why having static functions to save models, since "saving" and "loading" are actually expected behaviors of the
MLPandSklearnModels?I think it would be more natural to make the functions
save_best_modelandload_modelinsideMLPandSklearnModels.wdyt?
@thadeuluiz @Mathtzt @czewski