Closed heindorf closed 1 hour ago
This is related with a change in owlapy where the standard to save an ontology is by using an IRI and what the error is indicating is that Predictions_{str_targetconcept} is not a valid IRI because it does not contain one of ("/", ":", "#"). Now its true that the argument name path is a bit misleading but the path should be a valid iri in string format which basically refers to the saving filename. In this case we add a "./" before the name so it will be considered a valid IRI and filepath at the same time, i.e. (./Predictions{str_target_concept}. These changes are recent and the example is apparently not updated. Maybe we can alter the standard a bit to be less restrictive
By the way, the same issue occurs for CELOE: https://github.com/dice-group/Ontolearn/blob/35d5e597707f67ebc6dc124c0c9e4cce88c0572a/examples/concept_learning_with_celoe_heuristic.py#L76
Fixed with #477 We created a text for each example so that the examples will not be broken, see https://github.com/dice-group/Ontolearn/blob/develop/tests/test_example_celoe.py https://github.com/dice-group/Ontolearn/blob/develop/tests/test_evolearner.py
I tried to run
python concept_learning_with_evolearner.py
in the latest ontolearn version (0.80). However, I get the errorThe problem seems to be in the line
model.save_best_hypothesis(n=3, path='Predictions_{0}'.format(str_target_concept))