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

ConvE erroneously accepting subject corruptions in early_stopping mod… #195

Closed NicholasMcCarthy closed 4 years ago

NicholasMcCarthy commented 4 years ago

ConvE overrides the EmbeddingModel _initialize_early_stopping() function, as there are some different requirements for the OneToNAdapter - however the early stopping params 'corrupt_side' was not copied into the eval_config, which has now been fixed.

ConvE documentation said that early_stopping with 's', 's,o' corruption strategies was supported, but it wasn't. Getting ConvE to work would require over-riding the current EmbeddingModel initialize_early_stopping function. The recommended setting for ConvE early stopping was already object corruptions, and making the changes necessary for subject corruptions is needless overhead and code duplication for an edge case, so now ConvE will throw an error if subject corruptions of any kind are specified in early stopping.