v0.15.0#
Note
v0.15.0 is not yet released. This page reflects changes on the current
main branch that will eventually be a part of v0.15.0.
New features#
Added
plot_roc_curve_by_group()to plot ROC curves disaggregated by sensitive feature, together with the overall curve and a chance-level baseline. The corresponding AUC scores can be obtained withMetricFrameandsklearn.metrics.roc_auc_score: #869 by kstohr and Roman Lutz.
Bug fixes#
Fixed
AssertionError: data can be loaded only onceraised when aMomentinstance is passed asconstraintsto more than one call ofExponentiatedGradient.fitorGridSearch.fit, or shared between estimators. The fitted estimators now deep-copy the user-supplied constraints before loading data, leave the original object unmodified, and expose the loaded copy as the fitted attributeconstraints_: #1632 by BALOGUN DAVID TAIWO.Fixed
fetch_diabetes_hospitalso thatas_frame=Falsereturns numpy arrays instead of raising. The data is now always fetched as a pandas DataFrame internally and converted to numpy when needed. The skipped tests and the obsoletetest_fetch_diabetes_hospital_as_ndarray_raises_value_errortest were removed: #1636 by Richard Ogundele.
Documentation#
Removed stale deprecation notices in docstrings for changes that completed in v0.10 (
ThresholdOptimizer.predict_methoddefault,InterpolatedThresholder.predict_methoddefault, andMetricFrameconstructor positional-argument deprecation).
Other improvements#
Replaced the PyTorch adversarial engine’s hard-coded activation string checks with a lookup table and added support for
Tanh,GELU,ELU, andSELUactivation strings. Activation strings are now matched case-insensitively on both the PyTorch and TensorFlow backends (the TensorFlow backend previously failed on capitalized strings such asSigmoid): #1665 by Aryan.Added support for Python 3.14: #1649 by Roman Lutz.
Bumped the minimum
sphinxversion from 7.3.7 to 8.3.0 (and bumpedsphinx-promptfrom 1.8.0 to 1.9.0 andsphinx-autodoc-typehintsfrom 2.0.1 to 3.5.2 in the minimum-version pins for compatibility) so the documentation build picks up newer sphinx theme and extension improvements.Modernized internal type annotations to PEP 585 / PEP 604 syntax (
list[T],tuple[T, ...],T | U) where the imports fromtypingwere no longer necessary.Removed support for Python 3.10. The minimum supported Python version is now 3.11: #1653 by Roman Lutz.
Raised the minimum supported
scikit-learnversion to1.6.0and removed thefairlearn.utils._fixescompatibility shim, which existed to bridge thescikit-learn1.5 ↔ 1.6 API change (validate_dataimport location,force_all_finite→ensure_all_finiterename, and the wrappedparametrize_with_checks). Internal callers now import directly fromsklearn.utils.validationandsklearn.utils.estimator_checks. Also added a second set ofpytest-mplbaseline snapshots undertest/unit/plot_snapshots_mpl310/so the snapshot comparison runs on bothmatplotlib==3.10.x(used on Python 3.10 and inrequirements-min.txt) andmatplotlib>=3.11(used on Python 3.11+), since the two render-engine versions produce noticeably different output: #1654 by Roman Lutz.Removed dead
# noqacomments throughoutfairlearn/whose suppressed rule codes are not enabled in the project’s ruff configuration, plus the invalid# noqa : G003(extra space) typo variants.Worked around a
pytest.PytestRemovedIn10Warningcollection failure onpytest>=9by adding a thinparametrize_with_checkswrapper intest/_sklearn_compat.pythat materializes the generator returned bysklearn.utils.estimator_checks.parametrize_with_checksinto a list before handing it topytest.mark.parametrize: #1666 by Roman Lutz.Removed the
fairlearn.utils._compatibilityshim, which only existed to bridge theOneHotEncoder(sparse=...)→sparse_output=...rename completed inscikit-learn1.4. No longer needed now that the minimum supportedscikit-learnis ≥ 1.6: #1664 by Roman Lutz.Enabled the
pydocstyle(D) ruff rule set with the numpy convention. Added docstrings where missing for public APIs and per-file ignores for tests, examples, and scripts.Enabled the
flake8-logging-format(G) ruff rule set and converted existing logging calls to use lazy%sformatting.