Hi,
I'm encountering a persistent issue with Owlready2's sync_reasoner_pellet() that used to work perfectly fine on the same code and ontology file. Now, the reasoner never finishes, even after hours, and I’m trying to understand what changed.
I'm using owlready2 with Python 3.10 on macOS.
My ontology is loaded via:
from owlready2 import get_ontology
onto = get_ontology("file:///path/to/OntoDTAA.rdf").load()
It imports
https://spec.industrialontologies.org/ontology/core/Core, which have BFO or IOF in it.
Last week, I could:
Load the ontology
Flag a few individuals as anomalous and define new individuals and even merge one individual from a mapped ttl file which my data.
Run sync_reasoner_pellet(infer_property_values=True, infer_data_property_values=True)
And everything finished in under a minute. and the swrl rule worked.
Now when I run that same reasoning cell:
It starts:
* Owlready2 * Running Pellet... java -Xmx2000M ...
But then it never completes — no error, no output, and it runs indefinitely.
CPU usage spikes (Java ~200%), but nothing happens even after 1+ hour.
I've also tested this:
On Google Colab (clean environment): same issue
With different .rdf versions of my ontology, even old backups: same issue
With HermiT instead: also freezes at “Reasoner Initialization”
Using Pellet in Protégé: takes forever too
Tried limiting memory, increasing memory, disabling imports — no luck
🔍 What I’ve investigated
Checked for recursive axioms like Class ⊑ ∃R.Class: none found
Checked for individuals in disjoint classes: none found
Tried .imported_ontologies.clear() before reasoning: did not help
Triple count (via len(list(default_world.as_rdflib_graph()))) is ~950, so the ontology isn’t huge
Used default_world.save() to confirm the TTL file is clean and unchanged
My Questions
Why would Pellet reasoning work fine on the same ontology before, but now freeze even on fresh environments? Like the same code, same file, I run it again, and it gets stuck on reasoning.
How can I detect which axiom or class is causing Pellet to hang?
Any guidance or debugging strategies would be deeply appreciated 🙏
I’m happy to share my .rdf file if needed.