Search code examples
algorithmartificial-intelligenceaif360

AIF360 reweighing technique example errors


I was trying to run the aif360 reweighing technique from the github link (https://github.com/Trusted-AI/AIF360/blob/master/examples/demo_reweighing_preproc.ipynb). Even though I downloaded all the right files per the instruction. I was unable to successfully run it all because of the error :


ModuleNotFoundError Traceback (most recent call last) in 30 import matplotlib.pyplot as plt 31 ---> 32 from common_utils import compute_metrics

ModuleNotFoundError: No module named 'common_utils'

Unless I found this module and run it successfully, I won't be able to calculate the metrics. Has anybody encountered this ?


Solution

  • from common_utils import compute_metrics is a local import there. common_utils.py is avilable here. You just need to download and copy it to the same directory where your demo_reweighing_preproc.ipynb notebook file is.