Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'aix360.algorithms.rule_induction' #163

Closed
xiaohan2012 opened this issue Oct 10, 2022 · 3 comments
Closed

Comments

@xiaohan2012
Copy link

xiaohan2012 commented Oct 10, 2022

Hi,

I tried to run an example notebook via Docker.

I followed the instructions to build the Docker image and run the Jupyter server here

However, when I run the notebook examples/rule_induction/brcg_demo.ipynb

Importing the dependent libs simply gave:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-33e99aef874b> in <module>
      3 from sklearn.model_selection import train_test_split
      4 from sklearn.metrics import precision_score, recall_score, accuracy_score, balanced_accuracy_score
----> 5 from aix360.algorithms.rule_induction.rbm.boolean_rule_cg import BooleanRuleCG as BRCG
      6 from aix360.algorithms.rbm import FeatureBinarizer
      7 import time

ModuleNotFoundError: No module named 'aix360.algorithms.rule_induction'
@GhadaElkhawaga
Copy link

GhadaElkhawaga commented Nov 4, 2022

I get the same error ... I think it has something to do with the commit made 4 months ago... would you help with this @vijay-arya

@alonbrutzkus
Copy link

alonbrutzkus commented Nov 17, 2022

I changed the import to:

from aix360.algorithms.rbm import BooleanRuleCG as BRCG

This worked for me.

@xiaohan2012
Copy link
Author

xiaohan2012 commented Dec 19, 2022

@alonbrutzkus thanks, it imported the class, which however is not the same as the original one.

For instance, if importing it this way, I bumped into some error when running the notebook.

An alternative approach is to clone the AIX360 repo and add the local directory to python path, e.g.,

import sys
sys.path.insert(0, './AIX360/')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants