Draft: Refactor base model
What does the code in the MR do ?
This is still work in progress.
The goal of this MR is to refactor a bit the BaseModel
class. More precisely, the idea is to move "up" some logic from the AbtractModel
class which is currently doing a lot of things. Note that the GenericModel
class gets also simplified in the process.
When doing this refactoring I got a bit confused by the concept of "hyperparameters". It seems like this term refers to both:
- some special attributes of a model instance (for example
features
,dimension
, orsource_dimension
) - some variables of the
State
defined using theHyperParameter
class (for examplesources_std
orlog_v0_std
)
The AbstractModel
had a hyperparameters_names
method retrieving the latter while other parts of the code were considering the former (see save
method of the GenericModel
for instance).
At the moment, I implemented the hyperparameter getters as returning everything in a model instance which could be considered as such (i.e the model hyperparameter attributes AND the variables from the state if the model has one).
If we want to have such behavior, I will have to fix some broken tests, but I'm not sure this is the right move.
Let me know what you think.