AskNowQA / KrantikariQA

An InformationGain based Question Answering over knowledge Graph system.
57 stars 18 forks source link

Getting started issue. (Missing attribute 'CreateSubgraph') #20

Open tlinjordet opened 4 years ago

tlinjordet commented 4 years ago

Hello,

I am encountering the same problem mentioned in issue #16 but it is not clear what the solution is. This is happening at step 5 in the Readme.md, python data_creation_step1.py.

Note that the Python environment krantikari is built according to the provided environment.yml but there is no file data_creation_step1.py. Therefore, running (with sysargs)

(krantikari) user@host:/KrantikariQA$python data_creator_step1.py 0 -1 lcquad

results in the following output

Traceback (most recent call last):
  File "data_creator_step1.py", line 160, in <module>
    _predicate_blacklist=pb, _relation_file={}, return_data=False, _qald=False)
  File "data_creator_step1.py", line 71, in run
    cd_node = cd.CreateDataNode(_predicate_blacklist=_predicate_blacklist, _relation_file=_relation_file, _qald=_qald)
  File "/app/KrantikariQA/datasetPreparation/create_dataset.py", line 27, in __init__
    self.create_subgraph = es.CreateSubgraph(self.dbp, self.predicate_blacklist, self.relation_file, qald=_qald)
AttributeError: module 'datasetPreparation.entity_subgraph' has no attribute 'CreateSubgraph'

Hopefully this description provides all the details requested in this comment

I would also point out that there is no CreateSubgraph class in entity_subgraph.py, although it is called in both datasetPreparation/create_dataset.py and server.py which both do

from datasetPreparation import entity_subgraph as es

and each will attempt the same pattern:

self.create_subgraph = es.CreateSubgraph(self.dbp, self.predicate_blacklist, self.relation_file, qald=_qald)

and

subgraph_maker = es.CreateSubgraph(dbp, predicate_blacklist, {}, qald=False)

, respectively.

Any advice?