OntoZSL icon indicating copy to clipboard operation
OntoZSL copied to clipboard

pretrain_struc can't be run

Open Filco306 opened this issue 4 years ago • 1 comments

Hello,

I am trying to run your model, but it is not working. When I try to follow your instructions, I get the following error:

>>> python code/OntoEncoder/pretrain_struc.py --dataset NELL --hidden_dim 300
Traceback (most recent call last):
  File "/.../code/OntoEncoder/pretrain_struc.py", line 18, in <module>
    from code import KGEModel
ImportError: cannot import name 'KGEModel' from 'code' (/.../lib/python3.9/code.py)

Running it from any of the folders in the repo, does not work. How do I fix this? :)

Thank you!

Best, Filip

Filco306 avatar Dec 30 '21 15:12 Filco306

Hello,

I am trying to run your model, but it is not working. When I try to follow your instructions, I get the following error:

>>> python code/OntoEncoder/pretrain_struc.py --dataset NELL --hidden_dim 300
Traceback (most recent call last):
  File "/.../code/OntoEncoder/pretrain_struc.py", line 18, in <module>
    from code import KGEModel
ImportError: cannot import name 'KGEModel' from 'code' (/.../lib/python3.9/code.py)

Running it from any of the folders in the repo, does not work. How do I fix this? :)

Thank you!

Best, Filip

Hi Filip, I am sorry for the late reply. There is a mistake on the file name. The quoted code for "KGEModel" should be "from model import KGEModel". I will revise it right now.

genggengcss avatar Apr 14 '22 03:04 genggengcss