Skip to content

Commit

Permalink
Revert "Do not serializer.load_params_from_definition in sk_params"
Browse files Browse the repository at this point in the history
This reverts commit 65c290c.
  • Loading branch information
koropets committed Jul 1, 2024
1 parent d8b7a2c commit 9272270
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gordo/machine/model/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def sk_params(self):
fit_args = self.extract_supported_fit_args(self.kwargs)
if fit_args:
kwargs = deepcopy(self.kwargs)
kwargs.update(fit_args)
kwargs.update(serializer.load_params_from_definition(fit_args))
return kwargs
else:
return self.kwargs
Expand Down
6 changes: 5 additions & 1 deletion gordo/serializer/from_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import typing # noqa

from typing import Union, Dict, Any, Iterable

from keras.src.callbacks import Callback
from sklearn.pipeline import Pipeline, FeatureUnion
from sklearn.base import BaseEstimator
from tensorflow.keras import Sequential
Expand Down Expand Up @@ -365,5 +367,7 @@ def build_callbacks(definitions: list):
"""
callbacks = []
for callback in definitions:
callbacks.append(_build_step(callback))
callbacks.append(
callback if isinstance(callback, Callback) else _build_step(callback)
)
return callbacks

0 comments on commit 9272270

Please sign in to comment.