[ENH] address duplications in serialization methods of deep learning base class, `BaseDeepClassifier.save` and `BaseDeepRegressor.save`
#6,137 opened on Mar 16, 2024
Repository metrics
- Stars
- (7,162 stars)
- PR merge metrics
- (Avg merge 26d 10h) (86 merged PRs in 30d)
Description
There is substantial duplication in the serialization methods of deep learning base classes, BaseDeepClassifier.save and BaseDeepRegressor.save, and corresponding loader methods.
The methods are are almost identical, the main difference comes from only BaseDeepClassifier.save having cloudpickle support.
Without this difference, the DRY refactor strategy would be moving identical methods to a joint base class or mixin, similar to BasePanelMixin.
However, in the current situation there is some matching to do, possibly adding cloudpickle support to serialization of regressors too.
By naive inspection, I would expect that the classifier methods can be copied over, and at most some docstring changes (reference to classifier etc) are necessary.
If done soon, this would interact with https://github.com/sktime/sktime/pull/6098, so contibutors should branch off https://github.com/sktime/sktime/pull/6098 and avoid working close to the 0.30.0 release (likely in May 2024).