Update Dependencies for Latest Version Tests#1328
Open
bbengfort wants to merge 4 commits intoDistrictDataLabs:developfrom
Open
Update Dependencies for Latest Version Tests#1328bbengfort wants to merge 4 commits intoDistrictDataLabs:developfrom
bbengfort wants to merge 4 commits intoDistrictDataLabs:developfrom
Conversation
Member
|
Godspeed on the dependency updates @bbengfort -- I know this stuff can be finicky. Let me know if you would like me to pre-approve to help make merging smoother once CI passes. Really appreciate you diving back in to help revive Yellowbrick and get it back in sync with the latest scikit-learn! |
edschofield
added a commit
to PythonCharmers/yellowbrick
that referenced
this pull request
Mar 7, 2026
…ork with sklearn 1.6+ tags API Starting in scikit-learn 1.6, the type-checking functions is_classifier(), is_regressor(), is_clusterer(), and is_outlier_detector() were changed to use a new tags-based mechanism. Instead of inspecting the _estimator_type attribute directly, they now call get_tags(estimator), which in turn invokes estimator.__sklearn_tags__() and checks the estimator_type field on the returned Tags dataclass. ContribEstimator did not implement __sklearn_tags__(), so when sklearn called it, the call fell through to ContribEstimator.__getattr__(), which proxied it to the wrapped third-party estimator. Since third-party estimators (the whole reason ContribEstimator exists) typically don't implement __sklearn_tags__() either, this raised an AttributeError, causing all four type checks to fail. The fix adds a __sklearn_tags__() method to ContribEstimator that builds a default Tags object (via BaseEstimator) and replaces the estimator_type field with the value from self._estimator_type when set. This preserves the existing behavior where wrap(est, "classifier") makes the estimator pass is_classifier() checks, while remaining forward-compatible with sklearn's tags infrastructure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is an update to all of the test dependencies to ensure Yellowbrick works with the latest versions of it's primary dependencies.
This PR fixes #1327
I have made the following changes:
CHECKLIST
pytest?make html(must be run fromdocs/)?