salesforce / PyRCA

PyRCA: A Python Machine Learning Library for Root Cause Analysis
BSD 3-Clause "New" or "Revised" License
438 stars 45 forks source link

Java pacakge edu is missing for domain knowledge file #61

Open TangChenTom opened 1 month ago

TangChenTom commented 1 month ago

Hi, I am using the example code to import PC from pyrca.graphs.casual.pc to use my domain knowledge file. However, there is an error saying a Java package 'edu' is missing:

Traceback (most recent call last): File "/home/tom/latency_analysis/analysis.py", line 10, in from pyrca.graphs.causal.pc import PC File "/home/tom/.local/lib/python3.8/site-packages/pyrca/graphs/causal/init.py", line 8, in from .fges import FGES, FGESConfig File "/home/tom/.local/lib/python3.8/site-packages/pyrca/graphs/causal/fges.py", line 15, in from pyrca.thirdparty.pytetrad.tools.TetradSearch import TetradSearch File "/home/tom/.local/lib/python3.8/site-packages/pyrca/thirdparty/pytetrad/tools/TetradSearch.py", line 17, in import pyrca.thirdparty.pytetrad.tools.translate as tr File "/home/tom/.local/lib/python3.8/site-packages/pyrca/thirdparty/pytetrad/tools/translate.py", line 36, in import edu.cmu.tetrad.data as td File "/home/tom/.local/lib/python3.8/site-packages/jpype/imports.py", line 161, in find_spec raise ImportError("Java package '%s' not found, requested by alias '%s'" % (jname, name)) ImportError: Java package 'edu' not found, requested by alias 'edu'

My environment is Ubuntu 22.04 with openjdk 21.0.4. I install pyrca via the source code and the command pip install . I also installed all dependencies by pip install .[all]. Can you please check?

kangkannnng commented 3 weeks ago

Same here, have you solve it yet?

TangChenTom commented 3 weeks ago

Yes. It appears that in order to proceed with the intended course of action, it is imperative to procure the missing package externally and subsequently ensure its proper placement within the designated directory hierarchy, as this is a critical prerequisite for the successful execution of the program and the attainment of the desired outcome.