Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin scikit-learn dependency for shap #1491

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

leewyang
Copy link
Collaborator

@leewyang leewyang commented Jan 9, 2025

This PR pins the scikit-learn dependency of shap to version 1.5.2, since the most recent 1.6.0 version (released on 12/9/2024) modified the behavior of the BaseEstimator.__sklearn_tags__, which is causing this error when running optuna hyperparameter search:

AttributeError: 'super' object has no attribute '__sklearn_tags__'

@leewyang leewyang added the user_tools Scope the wrapper module running CSP, QualX, and reports (python) label Jan 9, 2025
@leewyang leewyang requested a review from amahussein January 9, 2025 18:24
@leewyang leewyang self-assigned this Jan 9, 2025
Copy link
Collaborator

@amahussein amahussein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that sickit-learn should be fine with python 3.9+
Is there any concern with the other dependencies I see on the package pypi page? matplotlib is the library I see in the error of the DLI docker.

Scikit-learn plotting capabilities (i.e., functions start with plot_ and classes end with Display) require Matplotlib (>= 3.3.4). For running the examples Matplotlib >= 3.3.4 is required. A few examples require scikit-image >= 0.17.2, a few examples require pandas >= 1.1.5, some examples require seaborn >= 0.9.0 and plotly >= 5.14.0.

@@ -81,6 +81,7 @@ dependencies = [
"xgboost==2.1.3",
# used for model interpretability. python [3.9, 3.12]
"shap==0.46.0",
"scikit-learn==1.5.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment that sickit-learn is required as dependency of shap?

Signed-off-by: Lee Yang <[email protected]>
@leewyang leewyang requested a review from amahussein January 9, 2025 21:33
Copy link
Collaborator

@amahussein amahussein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @leewyang
LGTME

Copy link
Collaborator

@parthosa parthosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @leewyang. LGTME

@leewyang leewyang merged commit a215df7 into NVIDIA:dev Jan 9, 2025
13 checks passed
@leewyang leewyang deleted the qualx_dependencies branch January 9, 2025 22:58
@leewyang leewyang restored the qualx_dependencies branch January 10, 2025 00:15
@leewyang leewyang deleted the qualx_dependencies branch January 10, 2025 00:16
@amahussein amahussein added the dependencies Pull requests that update a dependency file label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file user_tools Scope the wrapper module running CSP, QualX, and reports (python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants