AntNLP / gnn-dep-parsing

Apache License 2.0
32 stars 7 forks source link

Cannot import name 'Vocabulary' #2

Open Tomas-Jelinek opened 4 years ago

Tomas-Jelinek commented 4 years ago

I cannot make gnn-dep-parsing run. There is an issue with importing 'Vocabulary'... antu and dynet are up to date, using python 3.6.6. Please, help me solving this problem, so that I can use the parser...

jelinek@sag:~$ sudo -H pip3 install --upgrade antu Requirement already up-to-date: antu in /usr/local/lib/python3.6/dist-packages

jelinek@sag:/usr/local/gnn-dep-parsing/gnn-dep-parser/src$ python3 train.py --config_file ../configs/pdt_mdita.cfg --name PDTMDITA --gpu 0 Traceback (most recent call last): File "train.py", line 5, in from antu.io import Vocabulary ImportError: cannot import name 'Vocabulary'

TimeLessLing commented 4 years ago

You can change the code from antu.io import Vocabulary to from antu.io.vocabulary import Vocabulary. But I still meet the trouble in 'from antu.nn.dynet.init import OrthogonalInitializer'. I read the source code of antu package but can't find a class or function named "OrthogonalInitializer"

JT-Ushio commented 4 years ago

Sorry for the late reply, I was unable to access the code of antu v0.0.5 for 4 months due to the COVID-19. I've rewritten some code that the gnn parser relies on, and updated antu v0.0.5a. I also tested well in a new environment, everything is working now~