Skip to content

Investigate the usage of the ModelRecorder class #64

@rafaelpadilla

Description

@rafaelpadilla

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:

model.save_best_model(…)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions