Open cmungall opened 7 months ago
I wonder if this new dependency will make linkml-data2owl run faster because it's currently slow.
It should, I am not sure how much.
funowl is particularly slow for reading. But I am not sure the extent to which any slowness you perceive is due to the logic in linkml-owl or in the funowl writer. But I am fairly sure if it's the former we can optimize the code. Do you have examples?
Hi Chris! I've attached the schema (ds-graph.yaml) and data (normalized.yaml) Josef and I are running linkml-data2owl
cli with (github wasn't happy with just attaching yaml, so attached a zip of the two). It takes hours to run this command. Any ideas?
Oops forgot we normalize the schema. This linkml schema should be better as it brings the imports into it: ds-graph.zip
Thanks! Yes, this is slow, but I'm confident we can make some changes here that should improve things a lot.
The majority of the time is spent in rendering objects, and switching funowl for py-horned-owl will definitely increase speed here
There are also some inefficiencies in owl_dumper that are upstream. We plan to switch out dataclasses for pydantic or plain json dicts (#44). You also make heavy use of jinja templates - which is fine - but funowl is used to parse the output of these, which adds additional inefficiencies. These will be faster with py-horned-owl based parsing.
But the majority of the slowness is in the rendering of the OWL itself, wow, funowl is really slow here. We need to swap this out soon!
Thanks for looking into this. We'll try to tweak a little bit, but it does finish so that's good. We'll be on the lookout for the py-horned-owl update!
I don't think the conversion should be so hard, but I want to run some more tests first.
One consequence of the change is that ontologies will be exported in OWL/XML, not functional syntax:
https://github.com/jannahastings/py-horned-owl/issues/18
This should not be a limitation, since it can be easily converted with robot
(at least for ontologies that are not in multiple millions of classes). We could even have linkml-owl do the conversion on the fly by running robot
(but this is awkward). However, there is a certain ergonomic advantage in being able to see the more conventional and readable functional syntax as the default. (OWL/XML is the most useless of OWL serializations IMO)
How does that effect the templates, which I believe are all functional syntax? Will we need to update those?
Good point. We could use funowl to convert to triples, then use rdflib to create rdfxml and parse that using horned owl… but at this stage things may not be any faster!
On Fri, May 31, 2024 at 4:53 AM Bruce W. Herr II @.***> wrote:
How does that effect the templates, which I believe are all functional syntax? Will we need to update those?
— Reply to this email directly, view it on GitHub https://github.com/linkml/linkml-owl/issues/40#issuecomment-2141886401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMMOMQ7QW774QE4T7VWITZFBQDZAVCNFSM6AAAAABAGRAZN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRHA4DMNBQGE . You are receiving this because you authored the thread.Message ID: @.***>
Yeah, I'm happy to update our templates, but it would be a breaking change for those who have done the same. May need to bump major version (which is justified either way I think).
I think having to author templates as owx would be a bit of an obstacle, as this is such a verbose representation. Let's see what the py-horned-owl people say, I'm hoping it's not a big lift
On Fri, May 31, 2024 at 8:23 AM Bruce W. Herr II @.***> wrote:
Yeah, I'm happy to update our templates, but it would be a breaking change for those who have done the same. May need to bump major version (which is justified either way I think).
— Reply to this email directly, view it on GitHub https://github.com/linkml/linkml-owl/issues/40#issuecomment-2142494977, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMMONLGTN26UHS3YVFRSLZFCIXVAVCNFSM6AAAAABAGRAZN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSGQ4TIOJXG4 . You are receiving this because you authored the thread.Message ID: @.***>
See:
Which will be in 0.3.0: https://github.com/jannahastings/py-horned-owl/releases/tag/v0.3.0rc1