How to do inferencing?
Risho92 opened this issue · 2 comments
Risho92 commented
I am new to knowledge graph. I trained and tested ATTE model and the results look promising. Is it possible to provide the instructions to use this for inferencing?
ines-chami commented
The test.py script has an example for how to do inferencing. The different steps are:
- Load the data in a KGDataset object (see datasets/kg_dataset.py)
- Create the KG model (see models/)
- Given a query (head, relation, ?) or (?, relation, tail), predict the rank of the missing entity and compute the evaluation metrics. The function compute_metrics does both prediction and evaluation at the same time:
Line 185 in c0b7d90
Risho92 commented
Thank you