KRR-Oxford / DeepOnto

A package for ontology engineering with deep learning and language models.
https://krr-oxford.github.io/DeepOnto/
Apache License 2.0
173 stars 11 forks source link

BERTMapPipeline crashes on custom ontologies #21

Open cmdoret opened 3 weeks ago

cmdoret commented 3 weeks ago

Describe the bug When attempting to use BERTMapPipeline on publicly available ontologies, it fails with the following error:

ValueError: evaluation strategy steps requires either non-zero --eval_steps or --logging_steps

Based on #18 , I understand that this means deeponto failed to generate training data, however both ontologies are pretty large and have rdfs:label annotations. Any advice welcome

To Reproduce Steps to reproduce the behavior:

  1. Download schema.org ontology (or owl variant) on https://schema.org/docs/developers.html
  2. Download sphn schema on https://www.biomedit.ch/rdf/sphn-schema/sphn
  3. Get default configuration file based on docs
  4. Run the example from usage page.
from deeponto.onto import Ontology
from deeponto.align.bertmap import BERTMapPipeline

config = BERTMapPipeline.load_bertmap_config('config.yaml')
schemaorg = Ontology('schemaorg.ttl')
sphn = Ontology('sphn_schema.ttl')
BERTMapPipeline(schemaorg, sphn, config)

Expected behavior A mapping is generated

Desktop (please complete the following information):

Lawhy commented 2 weeks ago

You can try to use build_annotation_index or get_annotations method to see what happened and if there are any labels generated.

Lawhy commented 2 weeks ago

I also see that sphn with a bunch of imports. I am not sure the OWL API features implemented here can handle those external imports for now. So you can check if the ontologies are really loaded in completely. If not, you can probably use Protege to load and save a complete ontology before using BERTMap.