From 723c57c7e30e8b0659e5c1f91c4f45656d2e2917 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Fri, 19 Apr 2024 16:17:34 +0200 Subject: [PATCH] iter --- ragger_duck/embedding/_sentence_transformer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ragger_duck/embedding/_sentence_transformer.py b/ragger_duck/embedding/_sentence_transformer.py index cbd7308..7f80fa0 100644 --- a/ragger_duck/embedding/_sentence_transformer.py +++ b/ragger_duck/embedding/_sentence_transformer.py @@ -3,7 +3,7 @@ import time from sentence_transformers import SentenceTransformer as SentenceTransformerBase -from sklearn.base import BaseEstimator, TransformerMixin +from sklearn.base import BaseEstimator, TransformerMixin, _fit_context logger = logging.getLogger(__name__) @@ -71,6 +71,7 @@ def __init__( self.batch_size = batch_size self.show_progress_bar = show_progress_bar + @_fit_context(prefer_skip_nested_validation=False) def fit(self, X=None, y=None): """No-op operation, only validate parameters. @@ -87,7 +88,6 @@ def fit(self, X=None, y=None): self The fitted estimator. """ - self._validate_params() self._embedding = SentenceTransformerBase( model_name_or_path=self.model_name_or_path, modules=self.modules,