fairlearn / fairlearn

A Python package to assess and improve fairness of machine learning models.
https://fairlearn.org
MIT License
1.95k stars 420 forks source link

MNT Reassess pandas and scikit-learn bounds #1288

Open riedgar-ms opened 1 year ago

riedgar-ms commented 1 year ago

The current bounds listed for pandas and scikit-learn in requirements.txt are laughably out of date, and we're getting test failures due to deprecation warnings.

adrinjalali commented 1 year ago

we should support like, last two years or something, not more.

riedgar-ms commented 1 year ago

So PR #1287 updates the SciKit-Learn lower bound (assuming we merge) but that still leaves pandas. And that has a lot of deprecation warnings

adrinjalali commented 1 year ago

yeah, and we need to make sure we work with latest pandas, which is very different. Also, we might need to do changes related to the upcoming numpy=2 release.

riedgar-ms commented 1 year ago

Looks like we also have issues with things being deprecated in numpy as well

riedgar-ms commented 1 year ago

As mentioned on Discord, there's a problem with pandas. Python 3.8 is only supported up to pandas 2.0. Version 2.1 of pandas deprecates DataFrame.applymap() and introduces DataFrame.map() as a replacement.

This means that #1289 is actually incompatible with Python 3.8, and should perhaps be reverted. The issue it addressed can be hushed (for how) in pyproject.toml

adrinjalali commented 1 year ago

we could also do 3.9+ which would be 3.9, 3.10, 3.11, and the upcoming 3.12, which should be enough

riedgar-ms commented 1 year ago

Thoughts @fairlearn/fairlearn-maintainers ? I wouldn't object to bumping to >3.9, but this should probably be more widely considered.

hildeweerts commented 1 year ago

I also don't mind bumping to 3.9+ (and it's a good incentive for me to update my own installation, lol)

riedgar-ms commented 1 year ago

Thanks.... @MiroDudik @mmadaio @alliesaizan ?

TamaraAtanasoska commented 1 month ago

Maybe a year after removing python 3.8 is ok? :) Happy to make the change.

adrinjalali commented 1 month ago

Yeah I think we can remove now. Pythin 3.13 is out already, and we need to test for that.