Skip to content

Commit

Permalink
serde issues (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcebere authored Dec 12, 2022
1 parent dec70fe commit 74ce6e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/hyperimpute/plugins/core/base_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# third party
from optuna.trial import Trial
import pandas as pd
from pydantic import validate_arguments

# hyperimpute absolute
import hyperimpute.logger as log
Expand Down Expand Up @@ -112,15 +111,12 @@ def subtype() -> str:
def fqdn(cls) -> str:
return cls.type() + "." + cls.subtype() + "." + cls.name()

@validate_arguments(config=dict(arbitrary_types_allowed=True))
def fit_transform(self, X: pd.DataFrame, *args: Any, **kwargs: Any) -> pd.DataFrame:
return pd.DataFrame(self.fit(X, *args, *kwargs).transform(X))

@validate_arguments(config=dict(arbitrary_types_allowed=True))
def fit_predict(self, X: pd.DataFrame, *args: Any, **kwargs: Any) -> pd.DataFrame:
return pd.DataFrame(self.fit(X, *args, *kwargs).predict(X))

@validate_arguments(config=dict(arbitrary_types_allowed=True))
def fit(self, X: pd.DataFrame, *args: Any, **kwargs: Any) -> Any:
X = cast.to_dataframe(X)
return self._fit(X, *args, **kwargs)
Expand All @@ -129,7 +125,6 @@ def fit(self, X: pd.DataFrame, *args: Any, **kwargs: Any) -> Any:
def _fit(self, X: pd.DataFrame, *args: Any, **kwargs: Any) -> "Plugin":
...

@validate_arguments(config=dict(arbitrary_types_allowed=True))
def transform(self, X: pd.DataFrame) -> pd.DataFrame:
X = cast.to_dataframe(X)
return pd.DataFrame(self._transform(X))
Expand All @@ -138,7 +133,6 @@ def transform(self, X: pd.DataFrame) -> pd.DataFrame:
def _transform(self, X: pd.DataFrame) -> pd.DataFrame:
...

@validate_arguments(config=dict(arbitrary_types_allowed=True))
def predict(self, X: pd.DataFrame, *args: Any, **kwargs: Any) -> pd.DataFrame:
X = cast.to_dataframe(X)
return pd.DataFrame(self._predict(X, *args, *kwargs))
Expand Down
2 changes: 1 addition & 1 deletion src/hyperimpute/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.1.9"
__version__ = "0.1.10"
MAJOR_VERSION = "0.1"

0 comments on commit 74ce6e7

Please sign in to comment.