8000 Implement estimator__sklearn_tags__ method · KhiopsML/khiops-python@68c6656 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68c6656

Browse files
Implement estimator__sklearn_tags__ method
This is an update to the estimator API which generates an error starting with scikit-learn 1.7. We keep `_more_tags` for backward compatibility and implement `__sklearn_tags__` with it. For details see scikit-learn/scikit-learn#28910
1 parent 34c6714 commit 68c6656

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

khiops/sklearn/estimators.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ def __init__(
268268
# Make sklearn get_params happy
269269
self.internal_sort = internal_sort
270270

271+
def __sklearn_tags__(self):
272+
tags = super().__sklearn_tags__()
273+
for tag, value in self._more_tags():
274+
setattr(tags, tag, value)
275+
271276
def _more_tags(self):
272277
return {"allow_nan": True, "accept_large_sparse": False}
273278

0 commit comments

Comments
 (0)
0