-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixing topquadrant inference #108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…serve bnode identities
…py`. # Aider chat conversation: USER: I did `git reset --hard HEAD~1` to discard the last edits. ASSISTANT: Understood. Since you've performed a hard reset to undo the last commit, I will now provide the changes to revert the `expand` method and the `_expand_helper` method to their state before the commit with hash `b27e5cc`. Here are the diffs for those changes: ```diff --- brickschema/graph.py +++ brickschema/graph.py @@ ... @@ def expand( self, profile, backend=None, simplify=True, ontology_graph=None, iterative=True ): """ Expands the current graph with the inferred triples under the given entailment regime and with the given backend. Possible profiles are: - 'rdfs': runs RDFS rules - 'owlrl': runs full OWLRL reasoning - 'vbis': adds VBIS tags - 'shacl': does SHACL-AF reasoning (including tag inference, if the extension is loaded) @@ ... @@ elif profile == "owlrl": - self._inferbackend = OWLRLNaiveInferenceSession() - try: - if backend is None or backend == "reasonable": - self._inferbackend = OWLRLReasonableInferenceSession() - backend = "reasonable" - except ImportError: - warn( - "Could not load Reasonable reasoner. Needs 'reasonable' option during install." - ) - self._inferbackend = OWLRLNaiveInferenceSession() - - try: - if backend is None or backend == "allegrograph": - self._inferbackend = OWLRLAllegroInferenceSession() - backend = "allegrograph" - except (ImportError, ConnectionError): - warn( - "Could not load Allegro reasoner. Needs 'allegro' option during install." - ) - self._inferbackend = OWLRLNaiveInferenceSession() + self._inferbackend = OWLRLReasonableInferenceSession() elif profile == "vbis": self._inferbackend = VBISTagInferenceSession( brick_version=self._brick_version ) else: raise Exception(f"Invalid profile '{profile}'") - self._inferbackend.expand(self) + OWLRLNaiveInferenceSession().expand(self) if simplify: self.simplify() return self ``` This diff will revert the changes made to the `expand` method in the `brickschema/graph.py` file, effectively undoing the commit with hash `b27e5cc`.
…serve bnode identities Reverted changes to the `expand` method in `brickschema/graph.py`. USER: I did `git reset --hard HEAD~1` to discard the last edits. ASSISTANT: Understood. Since you've performed a hard reset to undo the last commit, I will now provide the changes to revert the `expand` method and the `_expand_helper` method to their state before the commit with hash `b27e5cc`. Here are the diffs for those changes: ```diff --- brickschema/graph.py +++ brickschema/graph.py @@ ... @@ def expand( self, profile, backend=None, simplify=True, ontology_graph=None, iterative=True ): """ Expands the current graph with the inferred triples under the given entailment regime and with the given backend. Possible profiles are: - 'rdfs': runs RDFS rules - 'owlrl': runs full OWLRL reasoning - 'vbis': adds VBIS tags - 'shacl': does SHACL-AF reasoning (including tag inference, if the extension is loaded) @@ ... @@ elif profile == "owlrl": - self._inferbackend = OWLRLNaiveInferenceSession() - try: - if backend is None or backend == "reasonable": - self._inferbackend = OWLRLReasonableInferenceSession() - backend = "reasonable" - except ImportError: - warn( - "Could not load Reasonable reasoner. Needs 'reasonable' option during install." - ) - self._inferbackend = OWLRLNaiveInferenceSession() - - try: - if backend is None or backend == "allegrograph": - self._inferbackend = OWLRLAllegroInferenceSession() - backend = "allegrograph" - except (ImportError, ConnectionError): - warn( - "Could not load Allegro reasoner. Needs 'allegro' option during install." - ) - self._inferbackend = OWLRLNaiveInferenceSession() + self._inferbackend = OWLRLReasonableInferenceSession() elif profile == "vbis": self._inferbackend = VBISTagInferenceSession( brick_version=self._brick_version ) else: raise Exception(f"Invalid profile '{profile}'") - self._inferbackend.expand(self) + OWLRLNaiveInferenceSession().expand(self) if simplify: self.simplify() return self ``` This diff will revert the changes made to the `expand` method in the `brickschema/graph.py` file, effectively undoing the commit with hash `b27e5cc`.
…mized data graph stops changing in size. Then, return the deskolemized data graph.
…/py-brickschema into fixing-topquadrant-inference
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.