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#

Bug fixes#

  • Fixed AssertionError: data can be loaded only once raised when a Moment instance is passed as constraints to more than one call of ExponentiatedGradient.fit or GridSearch.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 attribute constraints_: #1632 by BALOGUN DAVID TAIWO.

  • Fixed fetch_diabetes_hospital so that as_frame=False returns 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 obsolete test_fetch_diabetes_hospital_as_ndarray_raises_value_error test were removed: #1636 by Richard Ogundele.

Documentation#

  • Removed stale deprecation notices in docstrings for changes that completed in v0.10 (ThresholdOptimizer.predict_method default, InterpolatedThresholder.predict_method default, and MetricFrame constructor 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, and SELU activation strings. Activation strings are now matched case-insensitively on both the PyTorch and TensorFlow backends (the TensorFlow backend previously failed on capitalized strings such as Sigmoid): #1665 by Aryan.

  • Added support for Python 3.14: #1649 by Roman Lutz.

  • Bumped the minimum sphinx version from 7.3.7 to 8.3.0 (and bumped sphinx-prompt from 1.8.0 to 1.9.0 and sphinx-autodoc-typehints from 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 from typing were 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-learn version to 1.6.0 and removed the fairlearn.utils._fixes compatibility shim, which existed to bridge the scikit-learn 1.5 ↔ 1.6 API change (validate_data import location, force_all_finiteensure_all_finite rename, and the wrapped parametrize_with_checks). Internal callers now import directly from sklearn.utils.validation and sklearn.utils.estimator_checks. Also added a second set of pytest-mpl baseline snapshots under test/unit/plot_snapshots_mpl310/ so the snapshot comparison runs on both matplotlib==3.10.x (used on Python 3.10 and in requirements-min.txt) and matplotlib>=3.11 (used on Python 3.11+), since the two render-engine versions produce noticeably different output: #1654 by Roman Lutz.

  • Removed dead # noqa comments throughout fairlearn/ 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.PytestRemovedIn10Warning collection failure on pytest>=9 by adding a thin parametrize_with_checks wrapper in test/_sklearn_compat.py that materializes the generator returned by sklearn.utils.estimator_checks.parametrize_with_checks into a list before handing it to pytest.mark.parametrize: #1666 by Roman Lutz.

  • Removed the fairlearn.utils._compatibility shim, which only existed to bridge the OneHotEncoder(sparse=...)sparse_output=... rename completed in scikit-learn 1.4. No longer needed now that the minimum supported scikit-learn is ≥ 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 %s formatting.