fix builds by supporting sparse_output renamed parameter in OneHotEncoder in new scikit-learn version update #2507
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.
Description
fix builds by supporting sparse_output renamed parameter in OneHotEncoder in new scikit-learn version update
Builds are failing due to a parameter rename in scikit-learn package, which just recently released a new version:
https://github.com/microsoft/responsible-ai-toolbox/actions/runs/7619055180/job/20874745412?pr=2499
For more context please see scikit-learn docs:
https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html
This PR updates notebooks and test utilities to support both variants depending on the scikit-learn version in the build.
Note that rai-test-utils will need to be released at some point with the updates. For now, I've added a local install where required in the builds.
Checklist