wasiahmad/NeuralCodeSum

ImportError: No module named 'c2nl.eval.ltorank'

seekamoon opened this issue · 1 comments

Hello, I encountered the following problems while reproducing your work.

sec@WIN-NPQGFCOGD:/mnt/e/NeuralCodeSum/scripts/java$ bash rnn.sh -1 code2doc_rnn
============TRAINING============
Traceback (most recent call last):
File "../../main/train.py", line 27, in <module>
from c2nl.eval.bleu import corpus_bleu
File "/mnt/e/NeuralCodeSum/c2nl/eval/__init__.py", line 3, in <module>
from .ltorank import *
ImportError: No module named 'c2nl.eval.ltorank'
============TESTING============
Traceback (most recent call last):
File "../../main/train.py", line 27, in <module>
from c2nl.eval.bleu import corpus_bleu
File "/mnt/e/NeuralCodeSum/c2nl/eval/__init__.py", line 3, in <module>
from .ltorank import *
ImportError: No module named 'c2nl.eval.ltorank'
============Beam Search TESTING============
Traceback (most recent call last):
File "../../main/test.py", line 22, in <module>
from main.train import compute_eval_score
File "/mnt/e/NeuralCodeSum/main/train.py", line 27, in <module>
from c2nl.eval.bleu import corpus_bleu
File "/mnt/e/NeuralCodeSum/c2nl/eval/__init__.py", line 3, in <module>
from .ltorank import *
ImportError: No module named 'c2nl.eval.ltorank'

I check the file 'NeuralCodeSum/c2nl/eval/init.py' and find the following codes:
from .ltorank import *
from .squad_eval import *

However, there seems to be no 'ltorank.py' and 'squad_eval.py'. Are these two codes redundant ?

Thank you.

Yes, those are redundant. I have removed those import statements, it should work now. Thanks for pointing out.