Skip to content

Owlready2 Java Heap Size Error "OutOfMemoryError" Solution.

License

Notifications You must be signed in to change notification settings

AliYmn/Reasoner-Multiprocessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Output Example

Reasoner-Multiprocessing

I got an error while running too many rules on owlready2 on reasoner. I wanted to find a solution to this situation.

Error Preview;

java.lang.OutOfMemoryError: Java heap space:failed reallocation of scalar replaced objects.

Increasing the "Java Heap Size" was a bit of a solution, but still not enough.

Solution

This algorithm may not be correctly, but it can work for project or something. Let me explain how to solve it.

Split all the rules and send all them to the reasoner.

Algorithm

How to use it?

You can check "src/reasoner.py" all codes.

from reasoner import Reasoner

file_name = "example.owl"
reasoner_type = "pellet"
sleep_time = 10
infer_property_values = True
infer_data_property_values = True

Reasoner(
        file_name = file_name,
        reasoner_type = reasoner_type,
        sleep_time = sleep_time,
        infer_property_values = infer_property_values,
        infer_data_property_values = infer_data_property_values,
).run()

Releases

No releases published

Packages

No packages published

Languages