Repository navigation
Ontolearn 0.11.0
A stability and correctness release: a new goal-directed learning-problem generator, reproducible Drill runs, a long list of bug fixes across TDL, CELOE, TripleStore, NCES and CLIP, and a much better-tested codebase.
Highlights
- New:
GoalDirectedLPGenerator(ontolearn.lp_generator). Generates learning problems top-down from an explicit DL-construct grammar instead of refiningowl:Thingbottom-up likeLPGen/KB2Data.ComplexityProfile/DLConstructcontrol which constructors (⊓, ⊔, ∃, ∀, cardinality, has-value, ¬) and which length/depth/arity bounds are used.- Trivially solvable problems are filtered out;
generate()oversamples and keeps the hardest problems by a difficulty score (target length/depth, baseline F1, near-miss negatives). - Works on any KB, including ones with no object properties;
generate_benchmark()runs a whole curriculum of profiles. - See
examples/benchmark_complexity_lp_generator_with_tdl.py.
- Reproducible runs:
Drill(random_state=...)seeds a dedicated RNG plustorch/CUDA (#624), andLPGen/KB2Datatake arandom_seedbacked by their own RNG instead of the globalrandommodule (#595). (EvoLearneris still unseeded.) - TripleStore: instance retrieval is correct for
∃r.⊤on triplestores without reasoning (#581), correct variable scoping for indirect instances (#575), andindividuals_count/most_general_object_propertiesnow use server-sideCOUNT/ASKinstead of pulling whole result sets (#613). - CLIP: inference no longer feeds the positive examples in place of the negatives (#638, fixed in #639).
- CI: the intermittent 1h+ NCES hangs are fixed at the root (DataLoader worker-pool deadlock) (#622).
Upgrade notes
- Requires Python >= 3.11 (package metadata and docs now say so consistently).
- Depends on owlapy 1.6.6, which makes
owlready2an optional extra.ontolearn.incomplete_kbandontolearn.semantic_cachingimport it lazily; install it explicitly if you use them with owlready2. - Removed:
ontolearn/tentris.py(not importable since the owlapy 1.1.0 migration),CELOE._add_node_evald,ontolearn/logging_tentris.conf. - Behavior changes to be aware of
- CLIP length predictions can differ from 0.10.0 for the same inputs (negatives are now actually used at inference).
TDL/TDL_refinementno longer share a mutablekwargs_grid_searchdefault between instances.TDL/TDL_refinementdata-property filtering gained a toggle for boolean data properties (use_data_properties_boolean, #588); TDL's feature-matrixmax_runtimenow defaults toNone(#585).- Output previously
print()ed inknowledge_base,semantic_caching,drilland a few more modules now goes throughlogging(configure levels as usual).
Fixed
TDL_refinement.classification_reportalways raisedAttributeError(#616).DRILLSearchTreePriorityQueue.get_top_ncrashed (#605);LengthBasedRefinementnever skipped disjoint refinements (#604).ALCSAT/SPELLcrashed on ontologies with illegal punning such as Biopax (#598, via owlapy 1.6.6).EvoLearnerinstances no longer clobber each other's DEAP types (#609).NCESTrainer/NCES/NCES2/ROCESmultiprocessing DataLoader deadlocks (#610, #622).TripleStore.peek()crash for properties without domain/range axioms.- Non-deterministic
ConceptAbstractSyntaxTreeBuilderrepairs. - Malformed range/domain axioms are skipped instead of aborting a run (#587);
LearningProblemGeneratorworks again (#589); TDL++ integer handling (#593). - Several bare/broad
exceptclauses narrowed so real errors are no longer swallowed.
Performance
ModifiedCELOERefinementcomputesmax_nr_fillerslazily instead of sweeping every property against every individual up front (#612).TDL_refinementrenders each feature's DL syntax once instead of per example (#611).- TripleStore
COUNT/ASKqueries (see above).
Internal
TDL_refinement.fit()/create_training_datadeduplicated into sharedTDLhooks (#616);abox(),get_top_nandquality_funcsdeduplicated.- New unit tests for
quality_funcs(31→100%),nces_utils(39→87%),incomplete_kb(8→91%),data_struct(~60→97%),value_splitter(33→100%) andutils/static_funcs(37→92%). - Ruff
>=0.16with an explicitruff.toml; CI job has a 90-minute safety timeout.
Full changelog: https://github.com/dice-group/Ontolearn/blob/develop/CHANGELOG.md
Compare: 0.10.0...0.11.0