CUAI / CorrectAndSmooth

[ICLR 2021] Combining Label Propagation and Simple Models Out-performs Graph Neural Networks (https://arxiv.org/abs/2010.13993)
285 stars 52 forks source link

No such file or directory: 'julia' #6

Open ShunliRen opened 3 years ago

ShunliRen commented 3 years ago

After my installing the julia package, the following error happened when I run the code 'gen_models'. FileNotFoundError: [Errno 2] No such file or directory: 'julia' WHY? thx!

Chillee commented 3 years ago

You need to install Julia in order to generate the spectral embeddings.

If you're too lazy, you can just run the models without the spectral embeddings - I think MLP + C&S on Products still gets to 83.56 or so.

ShunliRen commented 3 years ago

The problem is that after my installing julia, the error occur. I CAN import julia ,but the error happened. Even i don't use "use-embedding" , the error still occurs. FileNotFoundError: [Errno 2] No such file or directory: 'julia'

Chillee commented 3 years ago

Can you post the exact command you're running, as well as the stack trace?

ShunliRen commented 3 years ago

python gen_models.py --dataset products --model mlp --hidden_channels 200 ` Namespace(dataset='products', device=0, dropout=0.5, epochs=300, hidden_channels=200, log_steps=1, lr=0.01, model='mlp', num_layers=3, runs=10, use_embeddings=False)

embeddings/spectralproducts.pt not found or not enough iterations! Regenerating it now Traceback (most recent call last): File "gen_models.py", line 207, in main() File "gen_models.py", line 148, in main embeddings = preprocess(preprocess_data, 'spectral', post_fix=args.dataset) File "/DATA2_DB1/data/slren/CorrectAndSmooth/diffusion_feature.py", line 116, in preprocess return spectral(data, post_fix) File "/DATA2_DB1/data/slren/CorrectAndSmooth/diffusion_feature.py", line 84, in spectral jl = Julia(compiled_modules=False) File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/site-packages/julia/core.py", line 468, in init jlinfo = JuliaInfo.load(runtime) File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/site-packages/julia/juliainfo.py", line 68, in load proc = subprocess.Popen( File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'julia'` I do not use embedding. and how to generate embedding?

Chillee commented 3 years ago

Ah - comment out line 148 and 147 here: https://github.com/CUAI/CorrectAndSmooth/blob/master/gen_models.py#L148 to run without embeddings.

To install Julia for generating the spectral embeddings, you need to install pyjulia in addition to the actual Julia language itself: https://julialang.org/

koooooooook commented 3 years ago

Similar problem here! I installed Julia and made PATH all right, but it says " julia.core.UnsupportedPythonError: It seems your Julia and PyJulia setup are not supported. " Could you please tell me what version did you use? (Python, Pytorch, cuda, Julia, PyJulia) Mine was (3.7.7, 1.8.0, 10.1, 1.5.4, ???)

ShunliRen commented 3 years ago

3.8.3 , 1.7.0,10.2,0.5.6. _

q-hwang commented 3 years ago

I am using python 3.6.10, pytorch 1.6.0, cuda 10.1, julia 1.0.5, pyjulia 0.5.6. Please check against the installation steps in https://pyjulia.readthedocs.io/en/latest/installation.html.

chewnglow commented 3 years ago
  1. You need to run import julia; julia.install() in addition.
  2. It seems that PyCharm run configuration may cause the error. Directly run in shell seems fine.
LH-mmm commented 2 years ago

Hi, I also have a question about Julia image

' from julia import Main ' no Main