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

Import statement for ClassificationMetric fails in Cent OS. #374

Closed
engineerpassion opened this issue Sep 14, 2022 · 4 comments · Fixed by #415
Closed

Import statement for ClassificationMetric fails in Cent OS. #374

engineerpassion opened this issue Sep 14, 2022 · 4 comments · Fixed by #415
Labels
bug Something isn't working easy Beginner issues good first issue Good for newcomers infra Infrastructure issues/enhancements

Comments

@engineerpassion
Copy link

engineerpassion commented Sep 14, 2022

Import statement fails as below in Cent OS.

  File "/opt/ibm/bias/python/service/runtime/aif360/metrics/aif360_metrics_evaluator.py", line 15, in <module>
    from aif360.metrics import ClassificationMetric
  File "/usr/lib/python3.10/site-packages/aif360/metrics/__init__.py", line 6, in <module>
    from aif360.metrics.mdss_classification_metric import MDSSClassificationMetric
  File "/usr/lib/python3.10/site-packages/aif360/metrics/mdss_classification_metric.py", line 6, in <module>
    from aif360.detectors.mdss.ScoringFunctions import Bernoulli, BerkJones, ScoringFunction
  File "/usr/lib/python3.10/site-packages/aif360/detectors/__init__.py", line 1, in <module>
    from aif360.detectors.mdss.MDSS import MDSS
  File "/usr/lib/python3.10/site-packages/aif360/detectors/mdss/MDSS.py", line 1, in <module>
    from aif360.detectors.mdss.ScoringFunctions.ScoringFunction import ScoringFunction
  File "/usr/lib/python3.10/site-packages/aif360/detectors/mdss/ScoringFunctions/__init__.py", line 5, in <module>
    from aif360.detectors.mdss.ScoringFunctions.Gaussian import Gaussian
  File "/usr/lib/python3.10/site-packages/aif360/detectors/mdss/ScoringFunctions/Gaussian.py", line 1, in <module>
    from turtle import pen
  File "/usr/lib/python3.10/turtle.py", line 107, in <module>
    import tkinter as TK
  File "/usr/lib/python3.10/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

Code to reproduce:

from aif360.metrics import ClassificationMetric
@engineerpassion engineerpassion changed the title Import statement for ClassificationMetric fails in OCP environment. Import statement for ClassificationMetric fails in Cent OS. Sep 14, 2022
@nrkarthikeyan nrkarthikeyan added the good first issue Good for newcomers label Sep 14, 2022
@nrkarthikeyan
Copy link
Collaborator

Does this work in 3.8/3.9 ?

@engineerpassion
Copy link
Author

Does this work in 3.8/3.9 ?

Yes.

@nrkarthikeyan nrkarthikeyan added easy Beginner issues infra Infrastructure issues/enhancements labels Sep 15, 2022
@hoffmansc hoffmansc added the bug Something isn't working label Sep 15, 2022
@gkumbhat
Copy link
Contributor

gkumbhat commented Oct 7, 2022

I think turtle isn't getting used and can be removed. PR: #415

@hoffmansc hoffmansc linked a pull request Nov 4, 2022 that will close this issue
@lanterno
Copy link

lanterno commented Mar 12, 2023

@hoffmansc Can we get a new patch release with the fix for this issue, please? 🙏

I tried installing the library from source into my own project, but faced lots of different issues for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy Beginner issues good first issue Good for newcomers infra Infrastructure issues/enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants