Accenture / AmpliGraph

Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Apache License 2.0
2.16k stars 250 forks source link

'ConvKB' object has no attribute 'corr_batch_size' #260

Closed WarisBunglawala closed 2 months ago

WarisBunglawala commented 2 years ago

Description

After completion of training ConvKB model i tried to predict the score of the triples using the following lines of code :

# predict the score of the triple (116 sha triple with 8 sha and 1 type triple)
triple_score1 = model.predict(np.array(test_triple1))
# print('Triple of interest: \n', test_triple1)
print('Triple Score: \n', triple_score1)

but it throws an error stating the following :

File "/ampligraph/latent_features/models/EmbeddingModel.py", line 1379, in _initialize_eval_graph
    self.corr_batches_count = int(np.ceil(len(corruption_entities) / (self.corr_batch_size)))
AttributeError: 'ConvKB' object has no attribute 'corr_batch_size'

So, i dont understand what i am doing wrong here and same error accurs while evaluation too. can you help me understand what should i do in order get the scores of triples as well as to evalute them using ranks.

sumitpai commented 2 years ago

I will check this issue and keep you updated