From 74ce6e70beafb34d126d32935abf3b5894c90827 Mon Sep 17 00:00:00 2001 From: Bogdan Cebere Date: Mon, 12 Dec 2022 21:24:56 +0200 Subject: [PATCH] serde issues (#29) --- src/hyperimpute/plugins/core/base_plugin.py | 6 ------ src/hyperimpute/version.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/hyperimpute/plugins/core/base_plugin.py b/src/hyperimpute/plugins/core/base_plugin.py index add3a2b..74bf666 100644 --- a/src/hyperimpute/plugins/core/base_plugin.py +++ b/src/hyperimpute/plugins/core/base_plugin.py @@ -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 @@ -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) @@ -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)) @@ -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)) diff --git a/src/hyperimpute/version.py b/src/hyperimpute/version.py index ab44cf2..6f8bb52 100644 --- a/src/hyperimpute/version.py +++ b/src/hyperimpute/version.py @@ -1,2 +1,2 @@ -__version__ = "0.1.9" +__version__ = "0.1.10" MAJOR_VERSION = "0.1"