Trusted-AI / AIF360

A comprehensive set of fairness metrics for datasets and machine learning models, explanations for these metrics, and algorithms to mitigate bias in datasets and models.
https://aif360.res.ibm.com/
Apache License 2.0
2.41k stars 825 forks source link

Incompatibility of Adversarial Debiasing with newer versions of tensorflow #289

Open relaxedplan opened 2 years ago

relaxedplan commented 2 years ago

Several lines in adversarial_debiasing.py are incompatible with newer versions of tensorflow, breaking the adversarial debiasing pipeline.

For instance, line 192 below uses tf.GlobalVariableInitializer, which no longer exists under tensorflow 2.7 (and potentially earlier versions as well). https://github.com/Trusted-AI/AIF360/blob/963df2e4eea807bd5765fee9f1c594500bdcbb5b/aif360/algorithms/inprocessing/adversarial_debiasing.py#L192

giandos200 commented 2 years ago

try to install earlier versions like tensorflow=="2.5.0" or check if the import tensorflow.compat.v1 is imported correctly. if you are interested in a tf2 version of adv.deb. check the forked AIF360 repo on my github profile. You'll found a TF2 version, with added a pertaining of both classifier and Adv NETs.