Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Apache License 2.0
2.12k
stars
252
forks
source link
A spelling mistake in `ampligraph/latent_features/models/EmbeddingModel.py` or documentation causes the training model different the documentation's #258
The spelling mistake in ampligraph/latent_features/models/EmbeddingModel.py or documentation causes the the strategy of generating corruptions is allways default('s,o').
Actual Behavior
I want to build a TransE model, when generates corruptions only changing tail entity.
After read the documentation, I passed the parameter embedding_model_params={'corrupt_sides': 'o'} to the TransE function to build the model.
When I single step debugging, I find that the strategy of generating corruptions is allways default('s,o').
The bug is caused by EmbeddingModel.py 667 line code corruption_sides = self.embedding_model_params.get('corrupt_side', constants.DEFAULT_CORRUPT_SIDE_TRAIN) . In this line, the variable self.embedding_model_params tries to get the value of key corrupt_side, but the documentation's key is corrupt_sides.
Solution
To solve the bug, we could pass the the parameter embedding_model_params={'corrupt_side': 'o'} to the TransE function instead of the documentation's parameter.
This is a serious mistake, fortunately,it is easy to solve, so I hope you could correct it quickly.
Description
The spelling mistake in
ampligraph/latent_features/models/EmbeddingModel.py
or documentation causes the the strategy of generating corruptions is allwaysdefault
('s,o').Actual Behavior
I want to build a
TransE
model, when generates corruptions only changing tail entity. After read the documentation, I passed the parameterembedding_model_params={'corrupt_sides': 'o'}
to theTransE
function to build the model. When I single step debugging, I find that the strategy of generating corruptions is allwaysdefault
('s,o'). The bug is caused byEmbeddingModel.py
667 line codecorruption_sides = self.embedding_model_params.get('corrupt_side', constants.DEFAULT_CORRUPT_SIDE_TRAIN)
. In this line, the variableself.embedding_model_params
tries to get the value of keycorrupt_side
, but the documentation's key iscorrupt_sides
.Solution
To solve the bug, we could pass the the parameter
embedding_model_params={'corrupt_side': 'o'}
to theTransE
function instead of the documentation's parameter. This is a serious mistake, fortunately,it is easy to solve, so I hope you could correct it quickly.Thank you!