Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Turnoff deep serialization (#160)
Browse files Browse the repository at this point in the history
* Set deep to False in autoestimator dict_serialization.

* Set deep to False in preparestep dict_serialization.

* Use default dict_serialization method in SmartTransformer.

* Set deep to False in columnsharer dict_serialization

* Set deep to False in Preparer dict_serialization

* Use default dict_serialization in auto_estimator
  • Loading branch information
jzhang-gp committed Sep 24, 2019
1 parent c2c213e commit 573b76f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion foreshadow/columnsharer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, *args, **kwargs):
lambda: False, acceptable_keys
)

def dict_serialize(self, deep=True):
def dict_serialize(self, deep=False):
"""Serialize the init parameters (dictionary form) of a columnsharer.
Args:
Expand Down
3 changes: 0 additions & 3 deletions foreshadow/estimators/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ def __init__(
self.estimator_class = None
self.estimator = None

def dict_serialize(self, deep=True): # noqa
return super().dict_serialize(deep=False)

@property
def problem_type(self):
"""Type of machine learning problem.
Expand Down
2 changes: 1 addition & 1 deletion foreshadow/preparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _get_params(self, attr, deep=True):
# adding steps to the get_params()
return out

def dict_serialize(self, deep=True):
def dict_serialize(self, deep=False):
"""Serialize the data preparer.
Args:
Expand Down
4 changes: 0 additions & 4 deletions foreshadow/smart/smart.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ def __init__(
self.transformer = transformer
self.check_wrapped = check_wrapped

def dict_serialize(self, deep=True): # noqa
serialized = super().dict_serialize(deep=False)
return serialized

@property
def transformer(self):
"""Get the selected transformer from the SmartTransformer.
Expand Down
2 changes: 1 addition & 1 deletion foreshadow/steps/preparerstep.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def configure_column_sharer(self, column_sharer):
super().configure_column_sharer(column_sharer)
self._parallel_process.configure_column_sharer(column_sharer)

def dict_serialize(self, deep=True):
def dict_serialize(self, deep=False):
"""Serialize the preparestep.
It renames transformer_list to transformation_by_column_group.
Expand Down

0 comments on commit 573b76f

Please sign in to comment.