-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor structural reasoner #100
Conversation
Can you please add few tests ? |
I was hoping we could discuss this stuff about StructuralReasoner on Monday before doing any changes |
Sorry, I don't think there is a need to discuss about these changes. We haven't discussed using LRUCache but this seems to be integrated which I haven't seen it |
self._init() | ||
|
||
def _init(self, cache_size=128): | ||
|
||
individuals = self._ontology.individuals_in_signature() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that we are removing the line where we get the individuals once and we are adding individual retrieval on line 606, 647, 767, 803 which will be killing the algo in large KGs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i just replaced ind_set with the individuals_in_signature() method when ever it is used.
Ig an advantage is that this is only computed if it is really need and not always on initialisation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get the correctness done first, then focus on trading of the memory with runtimes.
It is my mistake that I should have not accept the PR based on caching.
I have not integrated LRUCache, it has been there since the time of Simon Bin and Lukas and I'm not against removing it |
Refactoring for Issue #98