giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
845 stars 173 forks source link

Replace sklearn.utils.metaestimators.if_delegate_has_method with available_if #693

Closed allispaul closed 4 months ago

allispaul commented 6 months ago

Reference issues/PRs Fixes #680.

Types of changes

Description This replaces occurrences of the deprecated sklearn.utils.metaestimators.if_delegate_has_method, which was removed in scikit-learn version 1.3, with sklearn.utils.metaestimators.available_if. Before this change, the pytest tests were throwing errors for me. This is a breaking change because the minimum version of scikit-learn has to be increased from 0.23.1 to 1.1.0.

Screenshots (if appropriate)

Any other comments? I am still not passing all of the tests, but I think the failing tests are related to other issues.

Checklist

matteocao commented 4 months ago

@allispaul thank you for your PR.

Since we are trying to put everything back in palce once again, I will force-merge your contribution and take it from here.